|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
org.mortbay.http.HttpInputStream
HTTP Chunking InputStream. This FilterInputStream acts as a BufferedInputStream until setChunking(true) is called. Once chunking is enabled, the raw stream is chunk decoded as per RFC2616. The "8859-1" encoding is used on underlying LineInput instance for line based reads from the raw stream. This class is not synchronized and should be synchronized explicitly if an instance is used by multiple threads.
LineInput
Constructor Summary | |
HttpInputStream(java.io.InputStream in)
Constructor. |
|
HttpInputStream(java.io.InputStream in,
int bufferSize)
Constructor. |
Method Summary | |
void |
close()
|
void |
destroy()
|
int |
getContentLength()
Get the content length. |
java.io.OutputStream |
getExpectContinues()
|
java.io.InputStream |
getFilterStream()
Get Filter InputStream. |
java.io.InputStream |
getInputStream()
Get the raw stream. |
HttpFields |
getTrailer()
|
boolean |
isChunking()
Get chunking mode |
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
void |
resetStream()
Reset the stream. |
void |
setChunking()
Set chunking mode. |
void |
setContentLength(int len)
Set the content length. |
void |
setExpectContinues(java.io.OutputStream expectContinues)
|
void |
setFilterStream(java.io.InputStream filter)
Set Filter InputStream. |
long |
skip(long n)
|
Methods inherited from class java.io.FilterInputStream |
available, mark, markSupported, reset |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HttpInputStream(java.io.InputStream in)
public HttpInputStream(java.io.InputStream in, int bufferSize)
Method Detail |
public java.io.OutputStream getExpectContinues()
public void setExpectContinues(java.io.OutputStream expectContinues)
expectContinues
- The expectContinues to set.public int read() throws java.io.IOException
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
java.io.IOException
public int read(byte[] b) throws java.io.IOException
java.io.IOException
public long skip(long n) throws java.io.IOException
java.io.IOException
public java.io.InputStream getInputStream()
public java.io.InputStream getFilterStream()
public void setFilterStream(java.io.InputStream filter)
public boolean isChunking()
public void setChunking() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- Checking cannot be set if
a content length has been set.public void resetStream() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- The stream cannot be reset if
there is some unread chunked input or a content length greater
than zero remaining.public void close() throws java.io.IOException
java.io.IOException
public void setContentLength(int len)
len
- length.public int getContentLength()
public HttpFields getTrailer()
public void destroy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |