API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.io. ByteArrayInputStream View Source
Author(s)
Arthur van Hoff
Since
JDK1.0
Version
1.47, 11/17/05
Serial
Hierarchy
 Object
      InputStream
          ByteArrayInputStream
Implements
Subclasses
Description
public class ByteArrayInputStream
  A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream.
See also:    StringBufferInputStream
Constructors
public ByteArrayInputStream (byte[] buf)
  Creates a ByteArrayInputStream so that it uses buf as its buffer array.
public ByteArrayInputStream (byte[] buf, int offset, int length)
  Creates ByteArrayInputStream that uses buf as its buffer array.
Methods
Hide/Show inherited methods
publicsynchronized int available () [Overrides InputStream]
  Returns the number of remaining bytes that can be read (or skipped over) from this input stream.
public void close () throws IOException [Overrides InputStream]
  Closing a ByteArrayInputStream has no effect.
public void mark (int readAheadLimit) [Overrides InputStream]
  Set the current marked position in the stream.
public boolean markSupported () [Overrides InputStream]
  Tests if this InputStream supports mark/reset.
publicsynchronized int read () [Specified in InputStream]
  Reads the next byte of data from this input stream.
public int read (byte[] b) throws IOException [Inherited From InputStream]
  Reads some number of bytes from the input stream and stores them into the buffer array b.
publicsynchronized int read (byte[] b, int off, int len) [Overrides InputStream]
  Reads up to len bytes of data into an array of bytes from this input stream.
publicsynchronized void reset () [Overrides InputStream]
  Resets the buffer to the marked position.
publicsynchronized long skip (long n) [Overrides InputStream]
  Skips n bytes of input from this input stream.
Fields
Hide/Show inherited fields
protected byte buf
  An array of bytes that was provided by the creator of the stream.
protected int count
  The index one greater than the last valid character in the input stream buffer.
protected int mark
  The currently marked position in the stream.
protected int pos
  The index of the next character to read from the input stream buffer.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar