Class Record

    • Constructor Summary

      Constructors 
      Constructor Description
      Record()
      instantiates a blank record strictly for ID matching
      Record​(RecordInputStream in)
      Constructor Record
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()  
      protected abstract void fillFields​(RecordInputStream in)
      called by the constructor, should set class level fields.
      int getRecordSize()
      gives the current serialized size of the record.
      abstract short getSid()
      return the non static version of the id for this record.
      boolean isInValueSection()
      DBCELL, ROW, VALUES all say yes
      boolean isValue()
      tells whether this type of record contains a value
      byte[] serialize()
      called by the class that is responsible for writing this sucker.
      abstract int serialize​(int offset, byte[] data)
      called by the class that is responsible for writing this sucker.
      java.lang.String toString()
      get a string representation of the record (for biffview/debugging)
      protected abstract void validateSid​(short id)
      called by constructor, should throw runtime exception in the event of a record passed with a differing ID.
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Record

        public Record()
        instantiates a blank record strictly for ID matching
      • Record

        public Record​(RecordInputStream in)
        Constructor Record
        Parameters:
        in - the RecordInputstream to read the record from
    • Method Detail

      • validateSid

        protected abstract void validateSid​(short id)
        called by constructor, should throw runtime exception in the event of a record passed with a differing ID.
        Parameters:
        id - alleged id for this record
      • fillFields

        protected abstract void fillFields​(RecordInputStream in)
        called by the constructor, should set class level fields. Should throw runtime exception for bad/icomplete data.
        Parameters:
        in - the RecordInputstream to read the record from
      • serialize

        public byte[] serialize()
        called by the class that is responsible for writing this sucker. Subclasses should implement this so that their data is passed back in a byte array.
        Returns:
        byte array containing instance data
      • serialize

        public abstract int serialize​(int offset,
                                      byte[] data)
        called by the class that is responsible for writing this sucker. Subclasses should implement this so that their data is passed back in a byte array.
        Parameters:
        offset - to begin writing at
        data - byte array containing instance data
        Returns:
        number of bytes written
      • getRecordSize

        public int getRecordSize()
        gives the current serialized size of the record. Should include the sid and reclength (4 bytes).
      • isValue

        public boolean isValue()
        tells whether this type of record contains a value
      • isInValueSection

        public boolean isInValueSection()
        DBCELL, ROW, VALUES all say yes
      • toString

        public java.lang.String toString()
        get a string representation of the record (for biffview/debugging)
        Overrides:
        toString in class java.lang.Object
      • getSid

        public abstract short getSid()
        return the non static version of the id for this record.
      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.lang.Object