All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----java.io.InputStream | +----javax.servlet.ServletInputStream | +----com.oreilly.servlet.multipart.BufferedServletInputStream
BufferedServletInputStream
wraps a
ServletInputStream
in order to provide input buffering and to
avoid calling the the readLine
method of the wrapped
ServletInputStream
.
This is necessary because some servlet containers rely on the default
implementation of the readLine
method provided by the Servlet
API classes, which is very slow. Tomcat 3.2, Tomcat 3.1, the JSWDK 1.0 web
server and the JSDK2.1 web server are all known to need this class for
performance reasons.
Also, it may be used to work around a bug in the Servlet API 2.0
implementation of readLine
which contains a bug that causes
ArrayIndexOutOfBoundsExceptions
under certain conditions.
Apache JServ is known to suffer from this bug.
BufferedServletInputStream
that wraps the provided
ServletInputStream
.
read
method of
the wrapped ServletInputStream
.
read
method of
the wrapped ServletInputStream
.
readLine
method of
the wrapped ServletInputStream
.
public BufferedServletInputStream(ServletInputStream in)
BufferedServletInputStream
that wraps the provided
ServletInputStream
.
public int readLine(byte b[], int off, int len) throws IOException
readLine
method of
the wrapped ServletInputStream
.
public int read() throws IOException
read
method of
the wrapped ServletInputStream
.
-1
if the end of the
stream is reached.
public int read(byte b[], int off, int len) throws IOException
read
method of
the wrapped ServletInputStream
.
-1
if there is no more data because the end
of the stream has been reached.
All Packages Class Hierarchy This Package Previous Next Index