|
||||||||||
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.openqa.jetty.http.HttpInputStream
public class 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
Field Summary |
---|
Fields inherited from class java.io.FilterInputStream |
---|
in |
Constructor Summary | |
---|---|
HttpInputStream(InputStream in)
Constructor. |
|
HttpInputStream(InputStream in,
int bufferSize)
Constructor. |
Method Summary | |
---|---|
void |
close()
|
void |
destroy()
|
int |
getContentLength()
Get the content length. |
OutputStream |
getExpectContinues()
|
InputStream |
getFilterStream()
Get Filter InputStream. |
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(OutputStream expectContinues)
|
void |
setFilterStream(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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpInputStream(InputStream in)
public HttpInputStream(InputStream in, int bufferSize)
Method Detail |
---|
public OutputStream getExpectContinues()
expectContinues
- The expectContinues to set.public void setExpectContinues(OutputStream expectContinues)
expectContinues
- The expectContinues to set.public int read() throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] b) throws IOException
read
in class FilterInputStream
IOException
public long skip(long n) throws IOException
skip
in class FilterInputStream
IOException
public InputStream getInputStream()
public InputStream getFilterStream()
public void setFilterStream(InputStream filter)
public boolean isChunking()
public void setChunking() throws IllegalStateException
IllegalStateException
- Checking cannot be set if
a content length has been set.public void resetStream() throws IllegalStateException
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 IOException
close
in interface Closeable
close
in class FilterInputStream
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 |