Class w3c.www.http.ContentLengthInputStream
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.www.http.ContentLengthInputStream

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

public class ContentLengthInputStream
extends InputStream
The content length input stream is used internally to return entity bodies.

Variable Index

 o in
The original input stream.
 o length
The number of bytes readable from the above stream.
 o marklength
The place of a single pending mark.
 o observer
The stream observer, if any.

Constructor Index

 o ContentLengthInputStream(HttpStreamObserver, InputStream, int)
 o ContentLengthInputStream(InputStream, int)
Builds a new content-length input stream.

Method Index

 o available()
 o close()
 o mark(int)
 o read()
 o read(byte[], int, int)
 o reset()
 o skip(long)

Variables

 o in
  protected InputStream in
The original input stream.
 o observer
  protected HttpStreamObserver observer
The stream observer, if any.
 o length
  protected int length
The number of bytes readable from the above stream.
 o marklength
  protected int marklength
The place of a single pending mark.

Constructors

 o ContentLengthInputStream
  public ContentLengthInputStream(InputStream in,
                                  int length)
Builds a new content-length input stream. This stream acts as a normal stream except that it will return an end of file, after count bytes have been delivered.
 o ContentLengthInputStream
  public ContentLengthInputStream(HttpStreamObserver observer,
                                  InputStream in,
                                  int length)

Methods

 o mark
  public void mark(int readlimit)
Overrides:
mark in class InputStream
 o reset
  public void reset() throws IOException
Overrides:
reset in class InputStream
 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 skip
  public long skip(long n) throws IOException
Overrides:
skip in class InputStream
 o available
  public int available() throws IOException
Overrides:
available in class InputStream

All Packages  Class Hierarchy  This Package  Previous  Next  Index