: Class HttpInputStream

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

## com.mortbay.HTTP
Class HttpInputStream

    java.lang.Object
      |
      +--java.io.InputStream
            |
            +--javax.servlet.ServletInputStream
                  |
                  +--com.mortbay.HTTP.HttpInputStream

public class HttpInputStream
extends javax.servlet.ServletInputStream

HTTP input stream

Version:
  $Id: HttpInputStream.java,v 2.8 2000/08/15 02:23:03 bretts Exp $
Author:
  Greg Wilkins

Field Summary
`static int` | `__maxLineLength` Limit max line length

Constructor Summary
`HttpInputStream(java.io.InputStream in)` Constructor

Method Summary
`int` | `available()` Available bytes to read without blocking.
`void` | `chunking(boolean chunking)`
`void` | `close()` Close stream.
`HttpHeader` | `getFooters()` Get footers Only valid after EOF has been returned
`void` | `mark(int readlimit)` Not Implemented
`boolean` | `markSupported()` Mark is not supported
`int` | `read()`
`int` | `read(byte[] b)`
`int` | `read(byte[] b, int off, int len)`
`java.lang.String` | `readLine()` Read a line ended by CR or CRLF or LF.
`void` | `reset()` Not Implemented
`void` | `setContentLength(int len)` Set the content length.
`long` | `skip(long len)`

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

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

Field Detail

### __maxLineLength

    public static int __maxLineLength

  Limit max line length

Constructor Detail

### HttpInputStream

    public HttpInputStream(java.io.InputStream in)

  Constructor

Method Detail

### chunking

    public void chunking(boolean chunking)

  Parameters:
    `chunking` -

### setContentLength

    public void setContentLength(int len)

  Set the content length. Only this number of bytes can be read before EOF is returned.
  Parameters:
    `len` - length.

### readLine

    public java.lang.String readLine()
                              throws java.io.IOException

  Read a line ended by CR or CRLF or LF. More forgiving of line termination than ServletInputStream.readLine(). This method only read raw data, that may be chunked. Calling ServletInputStream.readLine() will always return unchunked data.

### read

    public int read()
             throws java.io.IOException

  Overrides:
    read in class java.io.InputStream

### read

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

  Overrides:
    read in class java.io.InputStream

### read

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

  Overrides:
    read in class java.io.InputStream

### skip

    public long skip(long len)
              throws java.io.IOException

  Overrides:
    skip in class java.io.InputStream

### available

    public int available()
                  throws java.io.IOException

  Available bytes to read without blocking. If you are unlucky may return 0 when there are more
  Overrides:
    available in class java.io.InputStream

### close

    public void close()
               throws java.io.IOException

  Close stream. The close is not passed to the wrapped stream, as this is needed for the response
  Overrides:
    close in class java.io.InputStream

### markSupported

    public boolean markSupported()

  Mark is not supported
  Overrides:
    markSupported in class java.io.InputStream
  Returns:
    false

### reset

    public void reset()

  Not Implemented
  Overrides:
    reset in class java.io.InputStream

### mark

    public void mark(int readlimit)

  Not Implemented
  Overrides:
    mark in class java.io.InputStream
  Parameters:
    `readlimit` -

### getFooters

    public HttpHeader getFooters()

  Get footers Only valid after EOF has been returned
  Returns:
    HttpHeader containing footer fields

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