IIOByteBuffer
is used by ImageInputStream
to supply a sequence of bytes
to the caller, possibly with fewer copies than using the conventional
read
methods that take a user-supplied byte array.
The byte array referenced by an IIOByteBuffer
will
generally be part of an internal data structure belonging to an
ImageReader
implementation; its contents should be
considered read-only and must not be modified.
Modifier and Type | Field and Description |
---|---|
private byte[] | |
private int | |
private int |
Access | Constructor and Description |
---|---|
public | IIOByteBuffer(byte[]
a byte array. data, int an int offset within the array. offset, int an int specifying the length of the data of
interest within byte array, in bytes. length)Constructs an |
Modifier and Type | Method and Description |
---|---|
public byte[] | |
public int | Returns: an int length.Returns the length of the data of interest within the byte
array returned by |
public int | Returns: an int offset.Returns the offset within the byte array returned by
|
public void | setData(byte[]
a byte array reference containing the new data value. data)Updates the array reference that will be returned by subsequent calls
to the |
public void | setLength(int
an int containing the new length value. length)Updates the value that will be returned by subsequent calls
to the |
public void | setOffset(int
an int containing the new offset value. offset)Updates the value that will be returned by subsequent calls
to the |
data | back to summary |
---|---|
private byte[] data |
length | back to summary |
---|---|
private int length |
offset | back to summary |
---|---|
private int offset |
IIOByteBuffer | back to summary |
---|---|
public IIOByteBuffer(byte[] data, int offset, int length) Constructs an
|
getData | back to summary |
---|---|
public byte[] getData() Returns a reference to the byte array. The returned value should
be treated as read-only, and only the portion specified by the
values of |
getLength | back to summary |
---|---|
public int getLength() Returns the length of the data of interest within the byte
array returned by |
getOffset | back to summary |
---|---|
public int getOffset() Returns the offset within the byte array returned by
|
setData | back to summary |
---|---|
public void setData(byte[] data) Updates the array reference that will be returned by subsequent calls
to the
|
setLength | back to summary |
---|---|
public void setLength(int length) Updates the value that will be returned by subsequent calls
to the
|
setOffset | back to summary |
---|---|
public void setOffset(int offset) Updates the value that will be returned by subsequent calls
to the
|