java.lang.Object
java.io.InputStream
jakarta.servlet.ServletInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
DefaultWebApplicationRequest
The ServletInputStream API.
- Author:
- Manfred Riem ([email protected])
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
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, skipNBytes, transferTo
-
Constructor Details
-
ServletInputStream
protected ServletInputStream()Constructor.
-
-
Method Details
-
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
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
Set the read listener.- Parameters:
readListener
- the read listener.
-