Interface FileData


public interface FileData
Calypso EF content.
Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets all known counters value.
    The counters values are extracted from record #1.
    If last counter has a truncated value (when size of record #1 modulo 3 != 0), then last counter value is not returned.
    Gets a reference to all known records content.
    byte[]
    Gets a reference to the known content of record #1.
    For a "binary" file, it means all the bytes of the file.
    byte[]
    getContent(int numRecord)
    Gets a reference to the known content of a specific record.
    byte[]
    getContent(int numRecord, int dataOffset, int dataLength)
    Gets a copy of a known content subset of a specific record from dataOffset to dataLength.
    getContentAsCounterValue(int numCounter)
    Gets the known value of the counter #numCounter.
    The counter value is extracted from the 3 next bytes at the index [(numCounter - 1) * 3] of the record #1.
    e.g.
  • Method Details

    • getContent

      byte[] getContent()
      Gets a reference to the known content of record #1.
      For a "binary" file, it means all the bytes of the file.
      Returns:
      an empty array if the record #1 is not set.
      Since:
      1.0.0
    • getContent

      byte[] getContent(int numRecord)
      Gets a reference to the known content of a specific record.
      Parameters:
      numRecord - The record number.
      Returns:
      an empty array if the requested record is not set.
      Since:
      1.0.0
    • getContent

      byte[] getContent(int numRecord, int dataOffset, int dataLength)
      Gets a copy of a known content subset of a specific record from dataOffset to dataLength.
      Parameters:
      numRecord - The record number.
      dataOffset - The offset index (should be >= 0).
      dataLength - The data length (should be >= 1).
      Returns:
      a not empty copy of the record subset content when the record is set, an empty array when the record is not set.
      Throws:
      IllegalArgumentException - if dataOffset < 0 or dataLength < 1.
      IndexOutOfBoundsException - if dataOffset >= content length or (dataOffset + dataLength) > content length.
      Since:
      1.0.0
    • getAllRecordsContent

      SortedMap<Integer,byte[]> getAllRecordsContent()
      Gets a reference to all known records content.
      Returns:
      a non-null map possibly empty if there's no content.
      Since:
      1.0.0
    • getContentAsCounterValue

      Integer getContentAsCounterValue(int numCounter)
      Gets the known value of the counter #numCounter.
      The counter value is extracted from the 3 next bytes at the index [(numCounter - 1) * 3] of the record #1.
      e.g. if numCounter == 2, then value is extracted from bytes indexes [3,4,5].
      Parameters:
      numCounter - The counter number (should be >= 1).
      Returns:
      The counter value or null if record #1 or numCounter is not set.
      Throws:
      IllegalArgumentException - if numCounter is < 1.
      IndexOutOfBoundsException - if numCounter has a truncated value (when size of record #1 modulo 3 != 0).
      Since:
      1.0.0
    • getAllCountersValue

      SortedMap<Integer,Integer> getAllCountersValue()
      Gets all known counters value.
      The counters values are extracted from record #1.
      If last counter has a truncated value (when size of record #1 modulo 3 != 0), then last counter value is not returned.
      Returns:
      an empty map if record #1 is not set.
      Since:
      1.0.0