Class ServletInputStream

java.lang.Object
java.io.InputStream
jakarta.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 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

      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.