Class NARStorageFile


public class NARStorageFile extends ObjectStorageFile
  • Constructor Details

    • NARStorageFile

      public NARStorageFile(int count, File fileName, boolean newTable)
  • Method Details

    • getObjectBytes

      protected byte[] getObjectBytes() throws IOException
      Throws:
      IOException
    • getDataToBytes

      protected byte[] getDataToBytes(int narLength) throws IOException
      Throws:
      IOException
    • skipObjectBytes

      protected int skipObjectBytes() throws IOException
      Throws:
      IOException
    • objectFromBytes

      protected Object objectFromBytes(byte[] bytes)
      Description copied from class: ObjectStorageFile
      This method should return an Object, as created by the given bytes. If, for whatever reason, the Object could not be created from these bytes, this method should return null.
      Specified by:
      objectFromBytes in class ObjectStorageFile
      Parameters:
      bytes - byte[] used to create the Object
      Returns:
      A valid Object, created from the bytes.
    • objectToBytes

      protected byte[] objectToBytes(Object obj)
      Description copied from class: ObjectStorageFile
      This method should return the Object in its byte[] format.
      Specified by:
      objectToBytes in class ObjectStorageFile
      Parameters:
      obj - Object to convert to bytes.
      Returns:
      bytes of the Object
    • main

      public static void main(String[] args)
      Prints out the NAR's in a NARStorageFile to standard out. Arguments: args[0] - Path to NARStorageFile.