|
||||||||||
| 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(java.io.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. |
java.lang.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(java.io.InputStream stream)
stream - Must be non-null.| Method Detail |
|---|
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.InputStreamjava.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.
read in class java.io.InputStreamb - 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 occurs
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.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 java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||