com.infoengine.soap.util
Class ChunkedInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.infoengine.soap.util.ChunkedInputStream
- public class ChunkedInputStream
- extends FilterInputStream
Chunked-Body = *chunk
last-chunk
trailer
CRLF
chunk = chunk-size [ chunk-extension ] CRLF
chunk-data CRLF
chunk-size = 1*HEX
last-chunk = 1*("0") [ chunk-extension ] CRLF
chunk-extension= *( ";" chunk-ext-name [ "=" chunk-ext-val ] )
chunk-ext-name = token
chunk-ext-val = token | quoted-string
chunk-data = chunk-size(OCTET)
trailer = *(entity-header CRLF)
Field Summary |
private long |
chunk_len
|
private boolean |
eof
|
(package private) byte[] |
one
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
one
byte[] one
chunk_len
private long chunk_len
eof
private boolean eof
ChunkedInputStream
public ChunkedInputStream(InputStream is)
- Parameters:
is
- the input stream to dechunk
read
public int read()
throws IOException
- Throws:
IOException
read
public int read(byte[] buf,
int off,
int len)
throws IOException
- Throws:
IOException
skip
public long skip(long num)
throws IOException
- Throws:
IOException
available
public int available()
throws IOException
- Throws:
IOException
getChunkLength
static final long getChunkLength(InputStream input)
throws IOException
- Throws:
IOException
close
public void close()
throws IOException
- Throws:
IOException
main
public static void main(String[] args)
throws Exception
- Throws:
Exception