| java.lang.Object java.io.InputStream java.io.FilterInputStream java.io.DataInputStream com.ibm.icu.impl.ICUBinaryStream
ICUBinaryStream | class ICUBinaryStream extends DataInputStream (Code) | | A DataInputStream that implements random-access seeking. For this
to work, the size of the data stream must be known in advance, or
the data must be supplied as a raw byte[] array.
Seeking doesn't work directly on all streams. If a given stream
doesn't support seeking, extract the bytes into a byte[] array and
use the byte[] constructor.
|
Constructor Summary | |
public | ICUBinaryStream(InputStream stream, int size) Construct a stream from the given stream and size.
Parameters: stream - the stream of data Parameters: size - the number of bytes that should be made availablefor seeking. | public | ICUBinaryStream(byte[] raw) Construct a stream from the given raw bytes. |
Method Summary | |
public void | seek(int offset) Seek to the given offset. |
ICUBinaryStream | public ICUBinaryStream(InputStream stream, int size)(Code) | | Construct a stream from the given stream and size.
Parameters: stream - the stream of data Parameters: size - the number of bytes that should be made availablefor seeking. Bytes beyond this may be read, but seeking willnot work for offset >= size. |
ICUBinaryStream | public ICUBinaryStream(byte[] raw)(Code) | | Construct a stream from the given raw bytes.
|
seek | public void seek(int offset) throws IOException(Code) | | Seek to the given offset. Offset is from the position of the
stream passed to the constructor, or from the start of the
byte[] array.
|
|
|