public interface EXRInputStream
Modifier and Type | Method and Description |
---|---|
long |
position()
Get the current reading position, in bytes from the beginning of the
stream.
|
void |
position(long pos)
Set the current position.
|
boolean |
read(ByteBuffer dst)
Read from the stream.
|
boolean read(ByteBuffer dst) throws EXRIOException
read(dst)
reads n bytes from the stream, where
n is the number of bytes remaining in the buffer, that is,
dst.remaining()
, at the moment this method is invoked. The bytes
are read into the current position of the buffer.
If the stream contains less than n bytes, or if an I/O error
occurs, read(dst)
throws an exception. If read(dst)
reads the last byte from the stream it returns false
, otherwise
it returns true
.
dst
- The buffer into which bytes are to be transferredfalse
if the call read the last byte from the stream,
true
otherwise.EXRIOException
- if the stream contains less than n
bytes, or if an I/O error occurs.long position() throws EXRIOException
read()
will read the first byte in
the stream file, position()
returns 0.EXRIOException
- if an I/O error occurs.void position(long pos) throws EXRIOException
position(i)
,
position()
returns i.pos
- the new reading position.EXRIOException
- if an I/O error occurs.