public class ByteArrayBinaryModel extends Object implements BinaryModel
| Constructor and Description |
|---|
ByteArrayBinaryModel() |
ByteArrayBinaryModel(byte[] data) |
ByteArrayBinaryModel(InputStream in) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the model and disposes all resources.
|
int |
getBytes(long offset,
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.
|
public ByteArrayBinaryModel()
public ByteArrayBinaryModel(byte[] data)
public ByteArrayBinaryModel(InputStream in) throws IOException
IOExceptionpublic long getLength()
BinaryModelgetLength in interface BinaryModelpublic int getBytes(long offset,
int len,
byte[] target)
getBytes in interface BinaryModeloffset - the starting offset >= 0len - the number of bytes >= 0 && <= size - offsettarget - the target array to copy intoArrayIndexOutOfBoundsException - Thrown if the area covered by
the arguments is not contained in the model.public void close()
BinaryModelclose in interface BinaryModelCopyright © 2014. All Rights Reserved.