public class UnsynchronizedByteArrayInputStream extends InputStream
ByteArrayInputStream which removes the synchronization overhead for non-concurrent access; as such this class is
not thread-safe.
To build an instance, use UnsynchronizedByteArrayInputStream.Builder.
| Modifier and Type | Class and Description |
|---|---|
static class |
UnsynchronizedByteArrayInputStream.Builder
Builds a new
UnsynchronizedByteArrayInputStream. |
| Modifier and Type | Field and Description |
|---|---|
static int |
END_OF_STREAM
The end of stream marker.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
static UnsynchronizedByteArrayInputStream.Builder |
builder()
Constructs a new
UnsynchronizedByteArrayInputStream.Builder. |
void |
mark(int readLimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] dest) |
int |
read(byte[] dest,
int off,
int len) |
void |
reset() |
long |
skip(long n) |
closepublic static final int END_OF_STREAM
public int available()
available in class InputStreampublic static UnsynchronizedByteArrayInputStream.Builder builder()
UnsynchronizedByteArrayInputStream.Builder.UnsynchronizedByteArrayInputStream.Builder.public void mark(int readLimit)
mark in class InputStreampublic boolean markSupported()
markSupported in class InputStreampublic int read()
read in class InputStreampublic int read(byte[] dest)
read in class InputStreampublic int read(byte[] dest,
int off,
int len)
read in class InputStreampublic void reset()
reset in class InputStreampublic long skip(long n)
skip in class InputStream