Class WebApplicationInputStream

java.lang.Object
java.io.InputStream
jakarta.servlet.ServletInputStream
cloud.piranha.core.api.WebApplicationInputStream
All Implemented Interfaces:
Closeable, AutoCloseable, Runnable
Direct Known Subclasses:
DefaultWebApplicationInputStream

public abstract class WebApplicationInputStream extends jakarta.servlet.ServletInputStream implements Runnable
The web application input stream.
Author:
Manfred Riem ([email protected])
  • Field Details

    • finished

      protected boolean finished
      Stores the finished flag.
    • index

      protected int index
      Stores the read index.
    • inputStream

      protected InputStream inputStream
      Stores the input stream.
    • readListener

      protected jakarta.servlet.ReadListener readListener
      Stores the read listener.
    • readListenerLock

      protected Lock readListenerLock
      Stores the read listener lock.
    • webApplicationRequest

      protected WebApplicationRequest webApplicationRequest
      Stores the web application request.
  • Constructor Details

    • WebApplicationInputStream

      public WebApplicationInputStream()
      Constructor.
  • Method Details

    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class InputStream
      Throws:
      IOException
    • getReadListener

      public jakarta.servlet.ReadListener getReadListener()
      Get the read listener.
      Returns:
      the read listener, or null if not set.
    • isFinished

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

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

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

      public void run()
      Specified by:
      run in interface Runnable
    • setInputStream

      public void setInputStream(InputStream inputStream)
      Set the input stream.
      Parameters:
      inputStream - the input stream.
    • setReadListener

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

      public void setWebApplicationRequest(WebApplicationRequest webApplicationRequest)
      Set the web application request.
      Parameters:
      webApplicationRequest - the web application request.