|
Copyright 2011-01-06 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.media.binary.ByteArrayBinaryModel
public class ByteArrayBinaryModel
Model for untyped binary data.
| Constructor Summary | |
|---|---|
ByteArrayBinaryModel()
|
|
ByteArrayBinaryModel(byte[] data)
|
|
ByteArrayBinaryModel(java.io.InputStream in)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ByteArrayBinaryModel()
public ByteArrayBinaryModel(byte[] data)
public ByteArrayBinaryModel(java.io.InputStream in)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public long getLength()
BinaryModel
getLength in interface BinaryModel
public 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 into
java.lang.ArrayIndexOutOfBoundsException - Thrown if the area covered by
the arguments is not contained in the model.public void close()
BinaryModel
close in interface BinaryModel
|
Copyright 2011-01-06 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||