public class FileData
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Method and 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.
|
int |
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. |
java.lang.String |
toString() |
public java.util.SortedMap<java.lang.Integer,byte[]> getAllRecordsContent()
public byte[] getContent()
java.util.NoSuchElementException - if record #1 is not set.public byte[] getContent(int numRecord)
numRecord - the record numberjava.util.NoSuchElementException - if record #numRecord is not set.public byte[] getContent(int numRecord,
int dataOffset,
int dataLength)
numRecord - the record numberdataOffset - the offset index (should be >= 0)dataLength - the data length (should be >= 1)java.lang.IllegalArgumentException - if dataOffset < 0 or dataLength < 1.java.util.NoSuchElementException - if record #numRecord is not set.java.lang.IndexOutOfBoundsException - if dataOffset >= content length or (dataOffset +
dataLength) > content length.public int getContentAsCounterValue(int numCounter)
numCounter - the counter number (should be >= 1)java.lang.IllegalArgumentException - if numCounter is < 1.java.util.NoSuchElementException - if record #1 or numCounter is not set.java.lang.IndexOutOfBoundsException - if numCounter has a truncated value (when size of record #1
modulo 3 != 0).public java.util.SortedMap<java.lang.Integer,java.lang.Integer> getAllCountersValue()
java.util.NoSuchElementException - if record #1 is not set.public java.lang.String toString()
toString in class java.lang.Object