public class SharedByteArrayInputStream extends ByteArrayInputStream implements SharedInputStream
| Modifier and Type | Field and Description |
|---|---|
protected int |
start
Position within shared buffer that this stream starts at.
|
buf, count, mark, pos| Constructor and Description |
|---|
SharedByteArrayInputStream(byte[] buf)
Create a SharedByteArrayInputStream that shares the entire
buffer.
|
SharedByteArrayInputStream(byte[] buf,
int offset,
int length)
Create a SharedByteArrayInputStream using a subset of the
array data.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getPosition()
Get the position within the output stream, adjusted by the
starting offset.
|
InputStream |
newStream(long offset,
long end)
Create a new input stream from this input stream, accessing
a subset of the data.
|
available, close, mark, markSupported, read, read, reset, skipreadpublic SharedByteArrayInputStream(byte[] buf)
buf - The input data.public SharedByteArrayInputStream(byte[] buf,
int offset,
int length)
buf - The source data array.offset - The starting offset within the array.length - The length of data to use.public long getPosition()
getPosition in interface SharedInputStreampublic InputStream newStream(long offset, long end)
newStream in interface SharedInputStreamoffset - The starting offset.end - The end offset (which can be -1).Copyright © 2013. All Rights Reserved.