Package javax.servlet
Class ServletInputStream
- java.lang.Object
-
- java.io.InputStream
-
- javax.servlet.ServletInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
DefaultWebApplicationRequest
public abstract class ServletInputStream extends InputStream
The ServletInputStream API.- Author:
- Manfred Riem ([email protected])
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ServletInputStream()
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
isFinished()
Is the stream at the end.abstract boolean
isReady()
Is the stream ready for reading.int
readLine(byte[] buffer, int offset, int length)
Read a line.abstract void
setReadListener(ReadListener readListener)
Set the read listener.-
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, nullInputStream, read, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Method Detail
-
isFinished
public abstract boolean isFinished()
Is the stream at the end.- Returns:
- true if it is, false otherwise.
-
isReady
public abstract boolean isReady()
Is the stream ready for reading.- Returns:
- true if it is, false otherwise.
-
readLine
public int readLine(byte[] buffer, int offset, int length) throws IOException
Read a line.- Parameters:
buffer
- the buffer.offset
- the offset.length
- the length.- Returns:
- the number of bytes read.
- Throws:
IOException
- when an I/O error occurs.
-
setReadListener
public abstract void setReadListener(ReadListener readListener)
Set the read listener.- Parameters:
readListener
- the read listener.
-
-