ByteArrayInputStream.ByteArrayInputStream

ByteArrayInputStream.ByteArrayInputStream

Class Overview | Class Members | This Package | All Packages

Syntax 1
public ByteArrayInputStream( byte buf[] )
Parameters
buf
the input buffer.
Description
Creates a new byte array input stream that reads data from the specified byte array. The byte array is not copied.



Syntax 2
public ByteArrayInputStream( byte buf[], int offset, int length )
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.
Description
Creates a new byte array input stream that reads data from the specified byte array. Up to length characters are to be read from the byte array, starting at the indicated offset.

The byte array is not copied.