    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.

##

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

##

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

##

available()
close()
finalize()
  Make sure the stream is ultimately closed !
mark(int)
read()
read(byte[], int, int)
reset()
skip(long)

##

in

      protected InputStream in

  The original input stream.

observer

      protected HttpStreamObserver observer

  The stream observer, if any.

length

      protected int length

  The number of bytes readable from the above stream.

marklength

      protected int marklength

  The place of a single pending mark.

##

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.

ContentLengthInputStream

      public ContentLengthInputStream(HttpStreamObserver observer,
                                      InputStream in,
                                      int length)

##

mark

      public void mark(int readlimit)

Overrides:
  mark in class InputStream

reset

      public void reset() throws IOException

Overrides:
  reset in class InputStream

close

      public synchronized void close() throws IOException

Overrides:
  close in class InputStream

read

      public int read() throws IOException

Overrides:
  read in class InputStream

read

      public int read(byte b[],
                      int off,
                      int len) throws IOException

Overrides:
  read in class InputStream

skip

      public long skip(long n) throws IOException

Overrides:
  skip in class InputStream

available

      public int available() throws IOException

Overrides:
  available in class InputStream

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