Class DataUnitFileInformation

java.lang.Object
binaryFileStorage.DataUnitFileInformation

public class DataUnitFileInformation extends Object
Little bit of data to add to all PamDataUnits when they are read back from a file which will be used to say which file they were from, whether they need updating, etc.
Author:
Doug Gillespie
  • Constructor Details

    • DataUnitFileInformation

      public DataUnitFileInformation(BinaryStore binaryStore, File file, long indexInFile)
  • Method Details

    • getShortFileName

      public String getShortFileName(int maxChars)
      Get a file name, but shortened to a maximum number of characters.

      Since the most file specific information will always come at the end of the file, the beginning of the name is stripped off and the end left alone.

      Parameters:
      maxChars - max length of file name to be returned.
      Returns:
      a shortened file name.
    • isNeedsUpdate

      public boolean isNeedsUpdate()
      Returns:
      the needsUpdate
    • setNeedsUpdate

      public void setNeedsUpdate(boolean needsUpdate)
      Parameters:
      needsUpdate - the needsUpdate to set
    • getFile

      public File getFile()
      Returns:
      the file
    • getIndexInFile

      public long getIndexInFile()
      Returns:
      the indexInFile
    • getBinaryStore

      public BinaryStore getBinaryStore()
      Returns:
      the binaryStore
    • setBinaryStore

      public void setBinaryStore(BinaryStore binaryStore)
      Parameters:
      binaryStore - the binaryStore to set