public class FileBasedBinaryModel extends java.lang.Object implements BinaryModel
FIXME - The file based binary model may grow infinitely large.
Constructor and Description |
---|
FileBasedBinaryModel(java.io.File file) |
FileBasedBinaryModel(java.io.File file,
long offset,
long length) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the model and disposes all resources.
|
void |
finalize() |
int |
getBytes(long off,
int len,
byte[] target)
Gets a sequence of bytes and copies them into the supplied byte array.
|
long |
getLength()
Returns the total length of the binary data.
|
java.lang.String |
toString() |
public FileBasedBinaryModel(java.io.File file) throws java.io.IOException
java.io.IOException
public FileBasedBinaryModel(java.io.File file, long offset, long length) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public long getLength()
BinaryModel
getLength
in interface BinaryModel
public int getBytes(long off, int len, byte[] target)
BinaryModel
getBytes
in interface BinaryModel
off
- the starting offset >= 0len
- the number of bytes >= 0 && <= size - offsettarget
- the target array to copy intopublic void close()
BinaryModel
close
in interface BinaryModel
public void finalize()
finalize
in class java.lang.Object