| java.lang.Object java.io.InputStream java.io.FilterInputStream org.apache.commons.httpclient.AutoCloseInputStream
AutoCloseInputStream | class AutoCloseInputStream extends FilterInputStream (Code) | | Closes an underlying stream as soon as the end of the stream is reached, and
notifies a client when it has done so.
author: Ortwin Glueck author: Eric Johnson author: Mike Bowler since: 2.0 |
Method Summary | |
public int | available() Obtains the number of bytes that can be read without blocking. | public void | close() Close the stream, and also close the underlying stream if it is not
already closed. | public int | read() Reads the next byte of data from the input stream. | public int | read(byte[] b, int off, int len) Reads up to len bytes of data from the stream. | public int | read(byte[] b) Reads some number of bytes from the input stream and stores them into the
buffer array b. |
AutoCloseInputStream | public AutoCloseInputStream(InputStream in, ResponseConsumedWatcher watcher)(Code) | | Create a new auto closing stream for the provided connection
Parameters: in - the input stream to read from Parameters: watcher - To be notified when the contents of the stream have beenconsumed. |
available | public int available() throws IOException(Code) | | Obtains the number of bytes that can be read without blocking.
the number of bytes available without blocking throws: IOException - in case of a problem |
close | public void close() throws IOException(Code) | | Close the stream, and also close the underlying stream if it is not
already closed.
throws: IOException - If an IO problem occurs. |
read | public int read() throws IOException(Code) | | Reads the next byte of data from the input stream.
throws: IOException - when there is an error reading the character read, or -1 for EOF |
read | public int read(byte[] b, int off, int len) throws IOException(Code) | | Reads up to len bytes of data from the stream.
Parameters: b - a byte array to read data into Parameters: off - an offset within the array to store data Parameters: len - the maximum number of bytes to read the number of bytes read or -1 for EOF throws: IOException - if there are errors reading |
read | public int read(byte[] b) throws IOException(Code) | | Reads some number of bytes from the input stream and stores them into the
buffer array b.
Parameters: b - a byte array to read data into the number of bytes read or -1 for EOF throws: IOException - if there are errors reading |
|
|