Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.activeio.journal.active
Class Record

    java.lang.Object
      org.activeio.journal.active.Record

All Implemented Interfaces:
  Disposable

public final class Record
extends java.lang.Object
implements Disposable

Serializes/Deserializes data records.

Version:
  $Revision: 1.1 $

Field Summary
`static int` | `CRC32_CHECKSUM_ALGORITHIM`
`static byte[]` | `END_OF_RECORD`
`static int` | `HASH_CHECKSUM_ALGORITHIM`
`static int` | `NO_CHECKSUM_ALGORITHIM`
`static int` | `RECORD_BASE_SIZE`
`static int` | `RECORD_FOOTER_SIZE`
`static int` | `RECORD_HEADER_SIZE`
`static int` | `SELECTED_CHECKSUM_ALGORITHIM`
`static byte[]` | `START_OF_RECORD`

Constructor Summary
`Record()`
`Record(byte recordType, Packet payload, Location mark)`
`Record(Location location, byte recordType, Packet payload, Location mark)`

Method Summary
`void` | `checksum(java.io.DataInput in)`
`void` | `dispose()` This method should not throw any exceptions.
`long` | `getChecksum()`
`Location` | `getLocation()`
`Location` | `getMark()`
`Packet` | `getPayload()`
`int` | `getPayloadLength()`
`int` | `getRecordLength()`
`byte` | `getRecordType()`
`boolean` | `hasRemaining()`
`static boolean` | `isChecksumingEnabled()`
`void` | `read(Packet packet)`
`void` | `readFooter(java.io.DataInput in)`
`boolean` | `readFromPacket(Packet packet)`
`void` | `readHeader(java.io.DataInput in)`
`void` | `setLocation(Location location)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### RECORD_HEADER_SIZE

    public static final int RECORD_HEADER_SIZE

See Also:
  Constant Field Values

### RECORD_FOOTER_SIZE

    public static final int RECORD_FOOTER_SIZE

See Also:
  Constant Field Values

### RECORD_BASE_SIZE

    public static final int RECORD_BASE_SIZE

See Also:
  Constant Field Values

### START_OF_RECORD

    public static final byte[] START_OF_RECORD

### END_OF_RECORD

    public static final byte[] END_OF_RECORD

### SELECTED_CHECKSUM_ALGORITHIM

    public static final int SELECTED_CHECKSUM_ALGORITHIM

### NO_CHECKSUM_ALGORITHIM

    public static final int NO_CHECKSUM_ALGORITHIM

See Also:
  Constant Field Values

### HASH_CHECKSUM_ALGORITHIM

    public static final int HASH_CHECKSUM_ALGORITHIM

See Also:
  Constant Field Values

### CRC32_CHECKSUM_ALGORITHIM

    public static final int CRC32_CHECKSUM_ALGORITHIM

See Also:
  Constant Field Values

Constructor Detail

### Record

    public Record()

### Record

    public Record(byte recordType,
                  Packet payload,
                  Location mark)
           throws java.io.IOException

### Record

    public Record(Location location,
                  byte recordType,
                  Packet payload,
                  Location mark)
           throws java.io.IOException

Method Detail

### isChecksumingEnabled

    public static boolean isChecksumingEnabled()

### setLocation

    public void setLocation(Location location)
                     throws java.io.IOException

  Throws:
    `java.io.IOException`

### readHeader

    public void readHeader(java.io.DataInput in)
                    throws java.io.IOException

  Throws:
    `java.io.IOException`

### readFooter

    public void readFooter(java.io.DataInput in)
                    throws java.io.IOException

  Throws:
    `java.io.IOException`

### checksum

    public void checksum(java.io.DataInput in)
                  throws java.io.IOException

  Throws:
    `java.io.IOException`

### readFromPacket

    public boolean readFromPacket(Packet packet)
                           throws java.io.IOException

  Throws:
    `java.io.IOException`

### getChecksum

    public long getChecksum()

  Returns:
    Returns the checksum.

### getPayloadLength

    public int getPayloadLength()

  Returns:
    Returns the length.

### getRecordLength

    public int getRecordLength()

  Returns:
    Returns the length of the record .

### getLocation

    public Location getLocation()

  Returns:
    Returns the location.

### getMark

    public Location getMark()

  Returns:
    Returns the mark.

### getPayload

    public Packet getPayload()

  Returns:
    Returns the payload.

### getRecordType

    public byte getRecordType()

  Returns:
    Returns the recordType.

### hasRemaining

    public boolean hasRemaining()

### read

    public void read(Packet packet)

### dispose

    public void dispose()

  Description copied from interface: `Disposable`
  This method should not throw any exceptions. Cleaning up a Disposable object should be easy of an end user therefore do not make him have to handle an Exception.

  Specified by:
    `dispose` in interface `Disposable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © -2005 The ActiveIO Project. All Rights Reserved.