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. |
Modifier and Type | Method and Description |
---|---|
void |
setData(byte[] buf,
int offset,
int length) |
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.Copyright ? 1998-2006 Bela Ban. All Rights Reserved.