Interface FileData
-
public interface FileData
Calypso EF content.- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.SortedMap<java.lang.Integer,java.lang.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.java.util.SortedMap<java.lang.Integer,byte[]>
getAllRecordsContent()
Gets a reference to all known records content.byte[]
getContent()
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.java.lang.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.
-
-
-
Method Detail
-
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:
java.lang.IllegalArgumentException
- if dataOffset<
0 or dataLength<
1.java.lang.IndexOutOfBoundsException
- if dataOffset>=
content length or (dataOffset + dataLength)>
content length.- Since:
- 1.0.0
-
getAllRecordsContent
java.util.SortedMap<java.lang.Integer,byte[]> getAllRecordsContent()
Gets a reference to all known records content.- Returns:
- a not null map possibly empty if there's no content.
- Since:
- 1.0.0
-
getContentAsCounterValue
java.lang.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:
java.lang.IllegalArgumentException
- if numCounter is<
1.java.lang.IndexOutOfBoundsException
- if numCounter has a truncated value (when size of record #1 modulo 3 != 0).- Since:
- 1.0.0
-
getAllCountersValue
java.util.SortedMap<java.lang.Integer,java.lang.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
-
-