java.io
Class ByteArrayInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.ByteArrayInputStream


public class ByteArrayInputStream
extends InputStream

Input stream that takes a byte[] as its source.

Compliance: CLDC: 1.0 complete

Compliance: J2SE: 1.4 complete


Field Summary
protected  byte[] buf
           
protected  int count
           
protected  int mark
           
protected  int pos
           
 
Constructor Summary
ByteArrayInputStream(byte[] buf)
           
ByteArrayInputStream(byte[] buf, int offset, int length)
           
 
Method Summary
 int available()
           
 void close()
           
 void mark(int readAheadlimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 void reset()
           
 long skip(long n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buf

protected byte[] buf

count

protected int count

mark

protected int mark

pos

protected int pos
Constructor Detail

ByteArrayInputStream

public ByteArrayInputStream(byte[] buf)

ByteArrayInputStream

public ByteArrayInputStream(byte[] buf,
                            int offset,
                            int length)
Method Detail

read

public int read()
Specified by:
read in class InputStream

read

public int read(byte[] b)
         throws IOException
Overrides:
read in class InputStream
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
Overrides:
read in class InputStream

skip

public long skip(long n)
Overrides:
skip in class InputStream

available

public int available()
Overrides:
available in class InputStream

markSupported

public boolean markSupported()
Overrides:
markSupported in class InputStream

mark

public void mark(int readAheadlimit)
Overrides:
mark in class InputStream

reset

public void reset()
Overrides:
reset in class InputStream

close

public void close()
           throws IOException
Overrides:
close in class InputStream
Throws:
IOException