public class HttpInputStream extends FilterInputStream
LineInput
in
Constructor and Description |
---|
HttpInputStream(InputStream in)
Constructor.
|
HttpInputStream(InputStream in,
int bufferSize)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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) |
available, mark, markSupported, reset
public HttpInputStream(InputStream in)
public HttpInputStream(InputStream in, int bufferSize)
public OutputStream getExpectContinues()
expectContinues()
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 interface AutoCloseable
close
in class FilterInputStream
IOException
public void setContentLength(int len)
len
- length.public int getContentLength()
public HttpFields getTrailer()
public void destroy()
Copyright © 2013. All Rights Reserved.