public class ExposedByteArrayInputStream
extends java.io.ByteArrayInputStream
| Constructor and Description |
|---|
ExposedByteArrayInputStream(byte[] buf)
Creates a
ByteArrayInputStream
so that it uses buf as its
buffer array. |
ExposedByteArrayInputStream(byte[] buf,
int offset,
int length)
Creates
ByteArrayInputStream
that uses buf as its
buffer array. |
public ExposedByteArrayInputStream(byte[] buf)
ByteArrayInputStream
so that it uses buf as its
buffer array.
The buffer array is not copied.
The initial value of pos
is 0 and the initial value
of count is the length of
buf.buf - the input buffer.public ExposedByteArrayInputStream(byte[] buf,
int offset,
int length)
ByteArrayInputStream
that uses buf as its
buffer array. The initial value of pos
is offset and the initial value
of count is the minimum of offset+length
and buf.length.
The buffer array is not copied. The buffer's mark is
set to the specified offset.buf - the input buffer.offset - the offset in the buffer of the first byte to read.length - the maximum number of bytes to read from the buffer.public void setData(byte[] buf,
int offset,
int length)
public int read()
read in class java.io.ByteArrayInputStreampublic int read(byte[] b,
int off,
int len)
read in class java.io.ByteArrayInputStreampublic long skip(long n)
skip in class java.io.ByteArrayInputStreampublic int available()
available in class java.io.ByteArrayInputStreampublic void reset()
reset in class java.io.ByteArrayInputStreamCopyright ? 1998-2008 Bela Ban. All Rights Reserved.