Class Record


  • public final class Record
    extends java.lang.Object
    Serializes/Deserializes data records.
    Version:
    $Revision: 1.1 $
    • Field Detail

      • 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
      • 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
        Throws:
        java.io.IOException
      • Record

        public Record​(Location location,
                      byte recordType,
                      Packet payload,
                      Location mark)
               throws java.io.IOException
        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
        Parameters:
        randomAccessFile -
        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()