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.http
Class SocketInputStream

    java.lang.Object
      java.io.InputStream
          org.apache.catalina.connector.http.SocketInputStream

public class SocketInputStream
extends java.io.InputStream

Extends InputStream to be more efficient reading lines during HTTP header processing.

Author:
  Remy Maucherat

Field Summary
`protected byte[]` | `buf` Deprecated. Internal buffer.
`protected int` | `count` Deprecated. Last valid byte.
`protected java.io.InputStream` | `is` Deprecated. Underlying input stream.
`protected int` | `pos` Deprecated. Position in the buffer.
`protected static StringManager` | `sm` Deprecated. The string manager for this package.

Constructor Summary
`SocketInputStream(java.io.InputStream is, int bufferSize)` Deprecated. Construct a servlet input stream associated with the specified socket input.

Method Summary
`int` | `available()` Deprecated. Returns the number of bytes that can be read from this input stream without blocking.
`void` | `close()` Deprecated. Close the input stream.
`protected void` | `fill()` Deprecated. Fill the internal buffer using data from the undelying input stream.
`int` | `read()` Deprecated. Read byte.
`void` | `readHeader(org.apache.catalina.connector.http.HttpHeader header)` Deprecated. Read a header, and copies it to the given buffer.
`void` | `readRequestLine(org.apache.catalina.connector.http.HttpRequestLine requestLine)` Deprecated. Read the request line, and copies it to the given buffer.

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

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

Field Detail

### buf

    protected byte[] buf

  Deprecated.
  Internal buffer.

### count

    protected int count

  Deprecated.
  Last valid byte.

### pos

    protected int pos

  Deprecated.
  Position in the buffer.

### is

    protected java.io.InputStream is

  Deprecated.
  Underlying input stream.

### sm

    protected static StringManager sm

  Deprecated.
  The string manager for this package.

Constructor Detail

### SocketInputStream

    public SocketInputStream(java.io.InputStream is,
                             int bufferSize)

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

Parameters:
  `is` - socket input stream
  `bufferSize` - size of the internal buffer

Method Detail

### readRequestLine

    public void readRequestLine(org.apache.catalina.connector.http.HttpRequestLine requestLine)
                         throws java.io.IOException

  Deprecated.
  Read the request line, and copies it to the given buffer. This function is meant to be used during the HTTP request header parsing. Do NOT attempt to read the request body using it.

  Parameters:
    `requestLine` - Request line object
  Throws:
    `java.io.IOException` - If an exception occurs during the underlying socket read operations, or if the given buffer is not big enough to accomodate the whole line.

### readHeader

    public void readHeader(org.apache.catalina.connector.http.HttpHeader header)
                    throws java.io.IOException

  Deprecated.
  Read a header, and copies it to the given buffer. This function is meant to be used during the HTTP request header parsing. Do NOT attempt to read the request body using it.

  Parameters:
    `header` - Request header
  Throws:
    `java.io.IOException` - If an exception occurs during the underlying socket read operations, or if the given buffer is not big enough to accomodate the whole line.

### read

    public int read()
             throws java.io.IOException

  Deprecated.
  Read byte.

  Throws:
    `java.io.IOException`

### available

    public int available()
                  throws java.io.IOException

  Deprecated.
  Returns the number of bytes that can be read from this input stream without blocking.

  Throws:
    `java.io.IOException`

### close

    public void close()
               throws java.io.IOException

  Deprecated.
  Close the input stream.

  Throws:
    `java.io.IOException`

### fill

    protected void fill()
                 throws java.io.IOException

  Deprecated.
  Fill the internal buffer using data from the undelying input stream.

  Throws:
    `java.io.IOException`

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.