|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
net.noderunner.http.ChunkedInputStream
public class ChunkedInputStream
An InputStream
wrapper supporting the chunked transfer encoding.
ChunkedOutputStream
Constructor Summary | |
---|---|
ChunkedInputStream(InputStream stream)
Constructs a chunked input stream wrapping input. |
Method Summary | |
---|---|
void |
close()
Closes the underlying input stream. |
MessageHeaders |
getEntityHeaders()
Returns "trailer" entity headers, which appear at the end of a chunked encoding request. |
boolean |
isEndChunk()
Returns true if the end chunk was read. |
int |
read()
Reads 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)
Reads up to len bytes of data from the input stream
into an array of bytes. |
String |
toString()
Returns a debug string. |
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, wait, wait, wait |
Constructor Detail |
---|
public ChunkedInputStream(InputStream stream)
stream
- Must be non-null.Method Detail |
---|
public void close() throws IOException
close
in interface Closeable
close
in class InputStream
IOException
public int read(byte[] b, int off, int len) throws 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.
read
in class 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
IOException
- if an input/output error occurspublic int read() throws IOException
read
in class InputStream
IOException
- if an input/output error occurspublic MessageHeaders getEntityHeaders()
isEndChunk()
returns true.
See: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1
public boolean isEndChunk()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |