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.IOExceptionpublic FileBasedBinaryModel(java.io.File file,
long offset,
long length)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic long getLength()
BinaryModelgetLength in interface BinaryModelpublic int getBytes(long off,
int len,
byte[] target)
BinaryModelgetBytes in interface BinaryModeloff - the starting offset >= 0len - the number of bytes >= 0 && <= size - offsettarget - the target array to copy intopublic void close()
BinaryModelclose in interface BinaryModelpublic void finalize()
finalize in class java.lang.Object