Class HttpInput

java.lang.Object
java.io.InputStream
jakarta.servlet.ServletInputStream
org.eclipse.jetty.ee10.servlet.HttpInput
All Implemented Interfaces:
Closeable, AutoCloseable

public class HttpInput extends jakarta.servlet.ServletInputStream

While this class is-a Runnable, it should never be dispatched in it's own thread. It is a runnable only so that the calling thread can use Context.run(Runnable) to setup classloaders etc.

  • Constructor Details

  • Method Details

    • recycle

      public void recycle()
    • reopen

      public void reopen()
    • getContentConsumed

      public long getContentConsumed()
    • getContentReceived

      public long getContentReceived()
    • consumeAvailable

      public boolean consumeAvailable()
    • isError

      public boolean isError()
    • isAsync

      public boolean isAsync()
    • getInvocationType

      public Invocable.InvocationType getInvocationType()
    • isFinished

      public boolean isFinished()
      Specified by:
      isFinished in class jakarta.servlet.ServletInputStream
    • isReady

      public boolean isReady()
      Specified by:
      isReady in class jakarta.servlet.ServletInputStream
    • setReadListener

      public void setReadListener(jakarta.servlet.ReadListener readListener)
      Specified by:
      setReadListener in class jakarta.servlet.ServletInputStream
    • onContentProducible

      public boolean onContentProducible()
    • read

      public int read() throws IOException
      Specified by:
      read in class InputStream
      Throws:
      IOException
    • read

      public int read(byte[] b, int off, int len) throws IOException
      Overrides:
      read in class InputStream
      Throws:
      IOException
    • read

      public int read(ByteBuffer buffer) throws IOException
      Throws:
      IOException
    • hasContent

      public boolean hasContent()
      Check if this HttpInput instance has content stored internally, without fetching/parsing anything from the underlying channel.
      Returns:
      true if the input contains content, false otherwise.
    • available

      public int available()
      Overrides:
      available in class InputStream
    • readCallback

      public void readCallback()
    • toString

      public String toString()
      Overrides:
      toString in class Object