public class ExposedByteArrayInputStream extends ByteArrayInputStream
buf, count, mark, pos| 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 |
|---|---|
int |
available() |
void |
close() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
void |
reset() |
void |
setData(byte[] buf,
int offset,
int length) |
long |
skip(long n) |
mark, markSupportedreadpublic 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 ByteArrayInputStreampublic int read(byte[] b,
int off,
int len)
read in class ByteArrayInputStreampublic long skip(long n)
skip in class ByteArrayInputStreampublic int available()
available in class ByteArrayInputStreampublic void reset()
reset in class ByteArrayInputStreampublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ByteArrayInputStreamIOExceptionCopyright © 2012 JBoss by Red Hat. All Rights Reserved.