All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.www.http.ChunkedInputStream

java.lang.Object
   |
   +----java.io.InputStream
           |
           +----w3c.www.http.ChunkedInputStream

public class ChunkedInputStream
extends InputStream
A Stream that parses and present chunk encoded data. This stream should only be used on top of a buffered input stream, it might be very inefficient otherwise. Chunk encoding is defined in version 1.1 of the HTTP specification.


Variable Index

 o ahead
 o buf
 o clen
 o eof
 o in
 o inited
 o isahead
 o observer
 o ps

Constructor Index

 o ChunkedInputStream(HttpStreamObserver, InputStream)
 o ChunkedInputStream(InputStream)

Method Index

 o available()
 o close()
 o finalize()
Make sure the stream is ultimately closed !
 o nextChunk(boolean)
Read in next chunk description.
 o read()
 o read(byte[], int, int)
 o skip(long)

Variables

 o in
 protected InputStream in
 o buf
 protected HttpBuffer buf
 o ps
 protected ParseState ps
 o inited
 protected boolean inited
 o clen
 protected int clen
 o ahead
 protected int ahead
 o isahead
 protected boolean isahead
 o eof
 protected boolean eof
 o observer
 protected HttpStreamObserver observer

Constructors

 o ChunkedInputStream
 public ChunkedInputStream(InputStream in) throws IOException
 o ChunkedInputStream
 public ChunkedInputStream(HttpStreamObserver observer,
                           InputStream in) throws IOException

Methods

 o nextChunk
 protected int nextChunk(boolean skipCRLF) throws IOException
Read in next chunk description. Sets the eof flag to true when reached.

Returns:
The length of next incomming chunk of data.
 o close
 public void close() throws IOException
Overrides:
close in class InputStream
 o read
 public int read() throws IOException
Overrides:
read in class InputStream
 o read
 public int read(byte b[],
                 int off,
                 int len) throws IOException
Overrides:
read in class InputStream
 o available
 public int available() throws IOException
Overrides:
available in class InputStream
 o skip
 public long skip(long n) throws IOException
Overrides:
skip in class InputStream
 o finalize
 public void finalize()
Make sure the stream is ultimately closed !

Overrides:
finalize in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index