xsul.http_common
Class HttpChunkedInputStream
java.lang.Object
java.io.InputStream
xsul.http_common.HttpChunkedInputStream
- public class HttpChunkedInputStream
- extends java.io.InputStream
Implementation of input stream that will read HTTP chunked encoding
- Version:
- $Revision: 1.2 $
- Author:
- Aleksander Slominski
|
Method Summary |
int |
available()
|
void |
close()
This implementation of HTTP chunked encoding
is designed to be layered over exisitng input stream
therefore close just finishes reading (discarding received data)
leaving stream exactly just after last byte of chunked data. |
void |
mark(int readlimit)
|
boolean |
markSupported()
|
static java.lang.String |
printable(char ch)
|
static java.lang.String |
printable(java.lang.String s)
simple utility method -- good for debugging |
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
void |
reset()
|
long |
skip(long n)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpChunkedInputStream
public HttpChunkedInputStream(java.io.InputStream source)
read
public int read()
throws java.io.IOException
- Throws:
java.io.IOException
read
public int read(byte[] b)
throws java.io.IOException
- Throws:
java.io.IOException
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- This implementation of HTTP chunked encoding
is designed to be layered over exisitng input stream
therefore close just finishes reading (discarding received data)
leaving stream exactly just after last byte of chunked data.
Also closing previously closed stream has no effect.
- Throws:
java.io.IOException
skip
public long skip(long n)
throws java.io.IOException
- Throws:
java.io.IOException
available
public int available()
throws java.io.IOException
- Throws:
java.io.IOException
mark
public void mark(int readlimit)
markSupported
public boolean markSupported()
reset
public void reset()
throws java.io.IOException
- Throws:
java.io.IOException
printable
public static final java.lang.String printable(java.lang.String s)
- simple utility method -- good for debugging
printable
public static final java.lang.String printable(char ch)
IU Extreme! Lab (http://www.extreme.indiana.edu)