All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----java.io.InputStream | +----javax.servlet.ServletInputStream | +----com.oreilly.servlet.multipart.LimitedServletInputStream
LimitedServletInputStream
wraps another
ServletInputStream
in order to keep track of how many bytes
have been read and detect when the Content-Length limit has been reached.
This is necessary since some servlet containers are slow to notice the end
of stream and cause the client code to hang if it tries to read past it.
LimitedServletInputStream
with the specified
length limit that wraps the provided ServletInputStream
.
read
method of
the wrapped ServletInputStream
.
read
method of
the wrapped ServletInputStream
.
readLine
method of
the wrapped ServletInputStream
.
public LimitedServletInputStream(ServletInputStream in, int totalExpected)
LimitedServletInputStream
with the specified
length limit 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 the end of
the stream has been reached.
All Packages Class Hierarchy This Package Previous Next Index