Copyright 2013-01-06 Werner Randelshofer

org.monte.media.binary
Interface BinaryModel

All Known Implementing Classes:
ByteArrayBinaryModel, FileBasedBinaryModel

public interface BinaryModel

Model for untyped binary data.

Version:
2.1 2010-04-09 Refactored into an interface.
1.0 1999-10-19
Author:
Werner Randelshofer, Hausmatt 10, CH-6405 Goldau, Switzerland

Method Summary
 void close()
          Closes the model and disposes all resources.
 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.
 

Method Detail

getLength

long getLength()
Returns the total length of the binary data.


getBytes

int getBytes(long off,
             int len,
             byte[] target)
Gets a sequence of bytes and copies them into the supplied byte array.

Parameters:
off - the starting offset >= 0
len - the number of bytes >= 0 && <= size - offset
target - the target array to copy into
Throws:
java.lang.ArrayIndexOutOfBoundsException - Thrown if the area covered by the arguments is not contained in the model.

close

void close()
Closes the model and disposes all resources.


Copyright 2013-01-06 Werner Randelshofer