Class DataBlockette

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected byte[] info  
      protected boolean swapBytes  
    • Constructor Summary

      Constructors 
      Constructor Description
      DataBlockette​(byte[] info, boolean swapBytes)  
      DataBlockette​(int size)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void checkMinimumSize​(int size)
      For use by subclasses that want to ensure that they are of a given size.
      byte[] toBytes()  
      byte[] toBytes​(short nextOffset)  
      protected void trimToSize​(int size)
      For use by subclasses that want to ensure that they are of a given size.
      void write​(java.io.DataOutputStream dos, short nextOffset)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • info

        protected byte[] info
      • swapBytes

        protected boolean swapBytes
    • Constructor Detail

      • DataBlockette

        public DataBlockette​(byte[] info,
                             boolean swapBytes)
      • DataBlockette

        public DataBlockette​(int size)
    • Method Detail

      • checkMinimumSize

        protected void checkMinimumSize​(int size)
                                 throws SeedFormatException
        For use by subclasses that want to ensure that they are of a given size.
        Throws:
        SeedFormatException - if the size is larger than the number of bytes
      • trimToSize

        protected void trimToSize​(int size)
                           throws SeedFormatException
        For use by subclasses that want to ensure that they are of a given size.
        Throws:
        SeedFormatException - if the size is larger than the number of bytes
      • write

        public void write​(java.io.DataOutputStream dos,
                          short nextOffset)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • toBytes

        public byte[] toBytes​(short nextOffset)