Name

java.io.ByteArrayInputStream

Synopsis

This class is identical to its J2SE counterpart. It is a subclass of InputStream, which reads data in as a series of bytes.

public classByteArrayInputStream extends java.io.InputStream {
   // protected fields
   protected byte[] buf;
   protected int count;
   protected int mark;
   protected int pos;

   // constructors
   public ByteArrayInputStream(byte[] buf);
   public ByteArrayInputStream(byte[] buf, int offset, int length);

   // public instance methods
   public synchronized int available();
   public synchronized  void close() throws java.io.IOException;
   public void mark(int readAheadLimit);
   public boolean markSupported();
   public synchronized int read();
   public synchronized int read(byte[] b, int off, int len);
   public synchronized void reset();
   public synchronized long skip(long n);
}

Get Wireless Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.