ServletInputStream Class |
public abstract class ServletInputStream extends InputStream |
    Object
       InputStream
         ServletInputStream
The ServletInputStream class is used to read binary data from a client request. It provides a method that can read the data one line at a time. Under some protocols (HTTP, POST, and PUT, for example), a ServletInputStream object can be used to read data sent from the client.

ServletInputStream() |
protected ServletInputStream() | Constructor
This constructor does nothing. Because ServletInputStream is an abstract class, a ServletInputStream object is never created directly.

readLine() |
public int readLine(byte[] buffer, int offset, int numBytes) throws IOException | Method
readLine() reads data one line at a time and stores the data in a byte array. The read operation starts at the specified offset and continues until the specified number of bytes is read or a newline character is reached. The newline character is stored in the byte array as well. The method returns –1 if the end-of-file is reached before the specified number of bytes is read.