public interface IRandomAccess extends DataInput, DataOutput
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this random access stream and releases
any system resources associated with the stream.
|
long |
getFilePointer()
Returns the current offset in this stream.
|
ByteOrder |
getOrder()
Returns the current order of the stream.
|
long |
length()
Returns the length of this stream.
|
int |
read(byte[] b)
Reads up to b.length bytes of data
from this stream into an array of bytes.
|
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from this stream into an array of bytes.
|
int |
read(ByteBuffer buffer)
Reads up to buffer.capacity() bytes of data
from this stream into a ByteBuffer.
|
int |
read(ByteBuffer buffer,
int offset,
int len)
Reads up to len bytes of data from this stream into a ByteBuffer.
|
void |
seek(long pos)
Sets the stream pointer offset, measured from the beginning
of this stream, at which the next read or write occurs.
|
void |
setOrder(ByteOrder order)
Sets the byte order of the stream.
|
void |
write(ByteBuffer buf)
Writes up to buffer.capacity() bytes of data from the given
ByteBuffer to this stream.
|
void |
write(ByteBuffer buf,
int off,
int len)
Writes up to len bytes of data from the given ByteBuffer to this
stream.
|
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
void close() throws IOException
IOException
long getFilePointer() throws IOException
IOException
long length() throws IOException
IOException
ByteOrder getOrder()
void setOrder(ByteOrder order)
order
- Order to set.int read(byte[] b) throws IOException
IOException
int read(byte[] b, int off, int len) throws IOException
IOException
int read(ByteBuffer buffer) throws IOException
IOException
int read(ByteBuffer buffer, int offset, int len) throws IOException
IOException
void seek(long pos) throws IOException
IOException
void write(ByteBuffer buf) throws IOException
IOException
void write(ByteBuffer buf, int off, int len) throws IOException
IOException
Copyright © 2015 Open Microscopy Environment