ByteArrayInputStream that lets you create duplicate streams from the
same underlying byte buffer.
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | WrappedByteArrayInputStream(byte[]
The byte buffer. buf, int The offset in the buffer of the first byte to read. offset, int The maximum number of bytes to read from the buffer. length)Create a new stream from the given buffer. |
| Modifier and Type | Method and Description |
|---|---|
| public InputStream | duplicate()
Implements com. Produces a duplicate stream of the source (from its start) that can be used in parallel to the original stream (ie, thread safe). |
| public long | Returns: The length of the underlying buffer.Returns the length of the underlying buffer (ie, the length of this stream). |
| WrappedByteArrayInputStream | back to summary |
|---|---|
| public WrappedByteArrayInputStream(byte[] buf) Create a new stream from the given buffer.
| |
| WrappedByteArrayInputStream | back to summary |
|---|---|
| public WrappedByteArrayInputStream(byte[] buf, int offset, int length) Create a new stream from the given buffer.
| |
| duplicate | back to summary |
|---|---|
| public InputStream duplicate() Implements com. Doc from com. Produces a duplicate stream of the source (from its start) that can be used in parallel to the original stream (ie, thread safe).
| |
| length | back to summary |
|---|---|
| public long length() Returns the length of the underlying buffer (ie, the length of this stream).
| |