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