|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--java.io.InputStream
This abstract class is the superclass of all classes representing an input stream of bytes.
| Constructor Summary | |
InputStream()
Default constructor. |
|
| Method Summary | |
int |
available()
Returns the number of bytes that can be read without blocking. |
void |
close()
Closes this input stream and releases all system resources associated with it. |
abstract int |
read()
Reads a single byte from this input stream. |
int |
read(byte[] bytes)
Reads up to b.length bytes from this stream into b. |
int |
read(byte[] bytes,
int ofs,
int len)
Reads up to len bytes from this stream into b starting at offset ofs. |
long |
skip(long n)
Skips over and discards n bytes from the input stream. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, toString |
| Constructor Detail |
public InputStream()
| Method Detail |
public int available()
throws IOException
IOException
public void close()
throws IOException
IOException
public abstract int read()
throws IOException
IOException - if an I/O error occurs.
public int read(byte[] bytes)
throws IOException
bytes - Array to be filled with data read.
IOException - if an I/O error occurs.
public int read(byte[] bytes,
int ofs,
int len)
throws IOException
bytes - Array to be filled with data read.ofs - Offset into b where to start writing the read data.len - Number of bytes to be read.
IndexOutOfBoundsException - when either ofs or len
are smaller than 0 or ofs+len exceed the array's length.
IOException - if an I/O error occurs.
public long skip(long n)
throws IOException
n - Number of bytes to overread.
IOException - if an I/O error occurs.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||