com.vividsolutions.jts.io
Class ByteArrayInStream
java.lang.Object
com.vividsolutions.jts.io.ByteArrayInStream
- InStream
public class ByteArrayInStream
extends java.lang.Object
Allows an array of bytes to be used as an
InStream
.
To optimize memory usage, instances can be reused
with different byte arrays.
void | read(byte[] buf) - Reads
buf.length bytes from the input stream
and stores them in the supplied buffer.
|
void | setBuffer(byte[] byteBuffer)
|
ByteArrayInStream
public ByteArrayInStream(byte[] byteBuffer)
read
public void read(byte[] buf)
throws IOException
Reads buf.length
bytes from the input stream
and stores them in the supplied buffer.
- read in interface InStream
buf
- the buffer to receive the bytes
setBuffer
public void setBuffer(byte[] byteBuffer)