javax.servlet
Class ServletInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by javax.servlet.ServletInputStream
All Implemented Interfaces:
java.io.Closeable
Direct Known Subclasses:
ServletInputStreamImpl

public abstract class ServletInputStream
extends java.io.InputStream

Servlets generally read POSTed data with ServletInputStream. ServletInputStream adds a readLine method to the standard InputStream API.


Constructor Summary
protected ServletInputStream()
           
 
Method Summary
 int readLine(byte[] buffer, int offset, int length)
          Reads a line from the POST data.
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletInputStream

protected ServletInputStream()
Method Detail

readLine

public int readLine(byte[] buffer,
                    int offset,
                    int length)
             throws java.io.IOException
Reads a line from the POST data.

Parameters:
buffer - buffer to hold the line data
offset - offset into the buffer to start
length - maximum number of bytes to read.
Returns:
number of bytes read or -1 on the end of line.
Throws:
java.io.IOException