Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina.connector
Class RequestStream

    java.lang.Object
      |
      +--java.io.InputStream
            |
            +--javax.servlet.ServletInputStream
                  |
                  +--org.apache.catalina.connector.RequestStream

Direct Known Subclasses:
  HttpRequestStream

public class RequestStream
extends javax.servlet.ServletInputStream

Convenience implementation of ServletInputStream that works with the standard implementations of Request. If the content length has been set on our associated Request, this implementation will enforce not reading more than that many bytes on the underlying stream.

Version:
  $Revision: 1.6 $ $Date: 2002/03/18 07:15:39 $
Author:
  Craig R. McClanahan

Field Summary
`protected boolean` | `closed` Deprecated. Has this stream been closed?
`protected int` | `count` Deprecated. The number of bytes which have already been returned by this stream.
`protected int` | `length` Deprecated. The content length past which we will not read, or -1 if there is no defined content length.
`protected static StringManager` | `sm` Deprecated. The localized strings for this package.
`protected java.io.InputStream` | `stream` Deprecated. The underlying input stream from which we should read data.

Constructor Summary
`RequestStream(Request request)` Deprecated. Construct a servlet input stream associated with the specified Request.

Method Summary
`void` | `close()` Deprecated. Close this input stream.
`int` | `read()` Deprecated. Read and return a single byte from this input stream, or -1 if end of file has been encountered.
`int` | `read(byte[] b)` Deprecated. Read some number of bytes from the input stream, and store them into the buffer array b.
`int` | `read(byte[] b, int off, int len)` Deprecated. Read up to `len` bytes of data from the input stream into an array of bytes.

Methods inherited from class javax.servlet.ServletInputStream
`readLine`

Methods inherited from class java.io.InputStream
`available, mark, markSupported, reset, skip`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### closed

    protected boolean closed

  Deprecated.
  Has this stream been closed?

### count

    protected int count

  Deprecated.
  The number of bytes which have already been returned by this stream.

### length

    protected int length

  Deprecated.
  The content length past which we will not read, or -1 if there is no defined content length.

### sm

    protected static StringManager sm

  Deprecated.
  The localized strings for this package.

### stream

    protected java.io.InputStream stream

  Deprecated.
  The underlying input stream from which we should read data.

Constructor Detail

### RequestStream

    public RequestStream(Request request)

  Deprecated.
  Construct a servlet input stream associated with the specified Request.

Parameters:
  `request` - The associated request

Method Detail

### close

    public void close()
               throws java.io.IOException

  Deprecated.
  Close this input stream. No physical level I-O is performed, but any further attempt to read from this stream will throw an IOException. If a content length has been set but not all of the bytes have yet been consumed, the remaining bytes will be swallowed.

  Overrides:
    `close` in class `java.io.InputStream`
    `java.io.IOException`

### read

    public int read()
             throws java.io.IOException

  Deprecated.
  Read and return a single byte from this input stream, or -1 if end of file has been encountered.

  Specified by:
    `read` in class `java.io.InputStream`
  Throws:
    `java.io.IOException` - if an input/output error occurs

### read

    public int read(byte[] b)
             throws java.io.IOException

  Deprecated.
  Read some number of bytes from the input stream, and store them into the buffer array b. The number of bytes actually read is returned as an integer. This method blocks until input data is available, end of file is detected, or an exception is thrown.

  Overrides:
    `read` in class `java.io.InputStream`
  Parameters:
    `b` - The buffer into which the data is read
  Throws:
    `java.io.IOException` - if an input/output error occurs

### read

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

  Deprecated.
  Read up to `len` bytes of data from the input stream into an array of bytes. An attempt is made to read as many as `len` bytes, but a smaller number may be read, possibly zero. The number of bytes actually read is returned as an integer. This method blocks until input data is available, end of file is detected, or an exception is thrown.

  Overrides:
    `read` in class `java.io.InputStream`
  Parameters:
    `b` - The buffer into which the data is read
    `off` - The start offset into array `b` at which the data is written
    `len` - The maximum number of bytes to read
  Throws:
    `java.io.IOException` - if an input/output error occurs

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.