java.io
ByteArrayInputStreamDeclaration
public class ByteArrayInputStream extends InputStream
java.lang.Object
|
+--java.io.InputStream
|
+--java.io.ByteArrayInputStream
Description
A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the
stream. An internal counter keeps track of the next byte to be supplied by the read method.
Since: JDK1.0, CLDC 1.0
Fields
protected byte[] buf
protected int count
protected int mark
protected int pos
Constructors
ByteArrayInputStream(byte[] buf)
ByteArrayInputStream(byte[] buf, int offset, int length)
Methods
int available()
void close()
void mark(int readAheadLimit)
boolean markSupported()
int read()
int read(byte[] b, int off, int len)
void reset()
long skip(long n)
Inherited Member Summary
Methods inherited from class InputStream
read(byte[])
Methods inherited from class Object
Inherited Member Summary
equals(Object), getClass(), hashCode(), notify(), notifyAll(), toString(), wait(),
wait(), wait()
Fields
buf
Declaration:
protected byte[] buf
Description:
An array of bytes that was provided by the creator of the stream. Elements buf[0] through buf[count-
1] are the only bytes that can ever be read from the stream; element buf[pos] is the next byte to be read.
pos
Declaration:
protected int pos
Description:
The index of the next character to read from the input stream buffer. This value should always be
nonnegative and not larger than the value of count. The next byte to be read from the input stream buffer
will be buf[pos].
mark
Declaration:
protected int mark
Description:
The currently marked position in the stream. ByteArrayInputStream objects are marked at position zero by
default when constructed. They may be marked at another position within the buffer by the mark()
method. The current buffer position is set to this point by the reset() method.
Since: JDK1.1
count
Declaration:
protected int count
Description:
The index one greater than the last valid character in the input stream buffer. This value should always be
nonnegative and not larger than the length of buf. It is one greater than the position of the last byte within
buf that can ever be read from the input stream buffer.
No comments:
Post a Comment