java.io
Class ByteArrayInputStream
java.lang.Object
java.io.InputStream
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
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buf
protected byte[] buf
count
protected int count
mark
protected int mark
pos
protected int pos
ByteArrayInputStream
public ByteArrayInputStream(byte[] buf)
ByteArrayInputStream
public ByteArrayInputStream(byte[] buf,
int offset,
int length)
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