public class UnsynchronizedByteArrayInputStream extends InputStream
ByteArrayInputStream
which removes the synchronization overhead for non-concurrent
access; as such this class is not thread-safe.Modifier and Type | Field and Description |
---|---|
static int |
END_OF_STREAM
The end of stream marker.
|
Constructor and Description |
---|
UnsynchronizedByteArrayInputStream(byte[] data)
Creates a new byte array input stream.
|
UnsynchronizedByteArrayInputStream(byte[] data,
int offset)
Creates a new byte array input stream.
|
UnsynchronizedByteArrayInputStream(byte[] data,
int offset,
int length)
Creates a new byte array input stream.
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
reset() |
long |
skip(long n) |
close
public static final int END_OF_STREAM
public UnsynchronizedByteArrayInputStream(byte[] data)
data
- the bufferpublic UnsynchronizedByteArrayInputStream(byte[] data, int offset)
data
- the bufferoffset
- the offset into the bufferIllegalArgumentException
- if the offset is less than zeropublic UnsynchronizedByteArrayInputStream(byte[] data, int offset, int length)
data
- the bufferoffset
- the offset into the bufferlength
- the length of the bufferIllegalArgumentException
- if the offset or length less than zeropublic int available()
available
in class InputStream
public int read()
read
in class InputStream
public int read(byte[] b)
read
in class InputStream
public int read(byte[] b, int off, int len)
read
in class InputStream
public long skip(long n)
skip
in class InputStream
public boolean markSupported()
markSupported
in class InputStream
public void mark(int readlimit)
mark
in class InputStream
public void reset()
reset
in class InputStream
Jas4pp 1.5 © Java Analysis Studio for Particle Physics