|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
public abstract class InputStream
Abstract base class for input streams.
Constructor Summary | |
---|---|
InputStream()
Constructor for subclasses to call. |
Method Summary | |
---|---|
int |
available()
Returns the number of bytes available for input. |
void |
close()
Closes the input stream. |
abstract int |
read()
Reads a byte from the input stream. |
int |
read(byte[] buffer)
Reads the input stream until the provided buffer has been filled, the end of stream has been reached or an exception has been thrown. |
int |
read(byte[] buffer,
int offset,
int length)
Reads the input stream until the specified number of bytes have been read, the end of stream has been reached or an exception has been thrown. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait |
Constructor Detail |
---|
public InputStream()
Method Detail |
---|
public int available() throws IOException
Typically subclassses override this method to return the correct value. The implementation in the base class (InputStream) always returns 0.
IOException
public void close() throws IOException
IOException
public abstract int read() throws IOException
This method blocks if no data is available.
IOException
public int read(byte[] buffer) throws IOException
This method blocks if no data is available.
buffer
- buffer to fill
IOException
public int read(byte[] buffer, int offset, int length) throws IOException
This implementation repeatedly calls the subclasses read method to retrieve bytes.
This method blocks if no data is available.
buffer
- buffer to filloffset
- offset to position in buffer to start filling datalength
- number of bytes to read
IOException
|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |