|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.InputStream | +--org.apache.commons.httpclient.ResponseInputStream
InputStream
wrapper supporting the chunked transfer encoding.
RequestOutputStream
Field Summary | |
static org.apache.commons.logging.Log |
log
Log object for this class. |
static org.apache.commons.logging.Log |
wireLog
Log for wire messages. |
Constructor Summary | |
ResponseInputStream(java.io.InputStream stream,
boolean chunked,
int contentLength)
|
|
ResponseInputStream(java.io.InputStream stream,
HttpMethod method)
Construct a servlet input stream associated with the specified Request. |
Method Summary | |
void |
close()
Close this input stream. |
int |
read()
Read and return a single byte from this input stream, or -1 if end of file has been encountered. |
int |
read(byte[] b,
int off,
int len)
Read up to len bytes of data from the input stream
into an array of bytes. |
Methods inherited from class java.io.InputStream |
available, mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final org.apache.commons.logging.Log log
public static final org.apache.commons.logging.Log wireLog
Constructor Detail |
public ResponseInputStream(java.io.InputStream stream, boolean chunked, int contentLength)
stream
- Must be non-null.chunked
- true
if the input stream is chunkedcontentLength
- content lengthpublic ResponseInputStream(java.io.InputStream stream, HttpMethod method)
stream
- Must be non-null.method
- Must be non-null.Method Detail |
public void close() throws java.io.IOException
close
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
len
bytes of data from the input stream
into an array of bytes. An attempt is made to read as many as
len
bytes, but a smaller number may be read,
possibly zero. The number of bytes actually read is returned as
an integer. This method blocks until input data is available,
end of file is detected, or an exception is thrown.
read
in class java.io.InputStream
b
- The buffer into which the data is readoff
- The start offset into array b
at which
the data is writtenlen
- The maximum number of bytes to read
java.io.IOException
- if an input/output error occurspublic int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
- if an input/output error occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |