Java Reference
In-Depth Information
It has two parameters:
ServletRequest
ServletResponse
It throws these exceptions:
ServletException
java.io.IOException
The ServletInputStream Class
The ServletInputStream is an abstract class defined for servlet writers to get data from the
client. It is meant to be implemented by a network services writer. This class has two methods.
The ServletInputStream() Method
protected ServletInputStream()
The ServletInputStream() method is the empty default constructor. It has no parameters,
returns no value, and throws no exceptions.
The readLine() Method
public void readLine(byte[] b,
int off,
int len)
throws java.io.IOException
The readLine() method reads the len of bytes into the passed-in byte array b , starting at posi-
tion off . If the character \n is encountered, no more bytes are read in. readLine() returns no
value.
It has three parameters:
byte[]
int
int
It throws this exception:
java.io.IOException
The ServletOutputStream Class
The ServletOutputStream class is used to write responses back to the client. It is an abstract
class that is implemented by the network services implementor. To access the
Search WWH ::




Custom Search