All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----java.io.InputStream
|
+----java.io.ByteArrayInputStream
StringBufferInputStream
.
len
bytes of data into an array of bytes
from this input stream.
n
bytes of input from this input stream.
protected byte buf[]
protected int pos
protected int mark
mark()
method.
The current buffer position is set to this point by the
reset()
method.
protected int count
public ByteArrayInputStream(byte buf[])
public ByteArrayInputStream(byte buf[],
int offset,
int length)
length
characters are to
be read from the byte array, starting at the indicated offset.
The byte array is not copied.
public synchronized int read()
int
in the range
0
to 255
. If no byte is available
because the end of the stream has been reached, the value
-1
is returned.
The read
method of ByteArrayInputStream
cannot block.
-1
if the end of the
stream has been reached.
public synchronized int read(byte b[],
int off,
int len)
len
bytes of data into an array of bytes
from this input stream. This read
method cannot block.
-1
if there is no more data because the end of
the stream has been reached.
public synchronized long skip(long n)
n
bytes of input from this input stream. Fewer
bytes might be skipped if the end of the input stream is reached.
public synchronized int available()
The available
method of
ByteArrayInputStream
returns the value of
count - pos
,
which is the number of bytes remaining to be read from the input buffer.
public boolean markSupported()
public void mark(int markpos)
public synchronized void reset()
All Packages Class Hierarchy This Package Previous Next Index