| java.lang.Object | |||
| ↳ | java.io.InputStream | ||
| ↳ | java.io.ByteArrayInputStream | ||
| ↳ | com.google.code.javax.mail.util.SharedByteArrayInputStream | ||
A ByteArrayInputStream that implements the SharedInputStream interface, allowing the underlying byte array to be shared between multiple readers.
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.InputStream
| |||||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| start | Position within shared buffer that this stream starts at. | ||||||||||
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.ByteArrayInputStream
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Create a SharedByteArrayInputStream representing the entire
byte array.
| |||||||||||
Create a SharedByteArrayInputStream representing the part
of the byte array from
offset for length
bytes. | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Return the current position in the InputStream, as an
offset from the beginning of the InputStream.
| |||||||||||
Return a new InputStream representing a subset of the data
from this InputStream, starting at
start (inclusive)
up to end (exclusive). | |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.ByteArrayInputStream
| |||||||||||
From class
java.io.InputStream
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.google.code.javax.mail.internet.SharedInputStream
| |||||||||||
From interface
java.io.Closeable
| |||||||||||
Position within shared buffer that this stream starts at.
Create a SharedByteArrayInputStream representing the entire byte array.
| buf | The byte array |
|---|
Create a SharedByteArrayInputStream representing the part
of the byte array from offset for length
bytes.
| buf | The byte array |
|---|---|
| offset | Offset in byte array to first byte to include |
| length | Number of bytes to include |
Return the current position in the InputStream, as an offset from the beginning of the InputStream.
Return a new InputStream representing a subset of the data
from this InputStream, starting at start (inclusive)
up to end (exclusive). start must be
non-negative. If end is -1, the new stream ends
at the same place as this stream. The returned InputStream
will also implement the SharedInputStream interface.
| start | The starting position |
|---|---|
| end | The ending position + 1 |