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, markSupported
read
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 ByteArrayInputStream
public int read(byte[] b, int off, int len)
read
in class ByteArrayInputStream
public long skip(long n)
skip
in class ByteArrayInputStream
public int available()
available
in class ByteArrayInputStream
public void reset()
reset
in class ByteArrayInputStream
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class ByteArrayInputStream
IOException
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.