Constructors
ByteArrayInputStream(byte[])Declaration:
public ByteArrayInputStream(byte[] buf)
Description:
Creates a 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.
Parameters:
buf - the input buffer.
ByteArrayInputStream(byte[], int, int)
Declaration:
public ByteArrayInputStream(byte[] buf, int offset, int length)
Description:
Creates ByteArrayInputStream that uses buf as its buffer array. The initial value of pos is offset
and the initial value of count is offset+length. The buffer array is not copied.
Note that if bytes are simply read from the resulting input stream, elements buf[pos] through
buf[pos+len-1] will be read; however, if a reset operation is performed, then bytes buf[0]
through buf[pos-1] will then become available for input.
Parameters:
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.
No comments:
Post a Comment