Package io.varhttp

Class ByteArrayServletInputStream

java.lang.Object
java.io.InputStream
jakarta.servlet.ServletInputStream
io.varhttp.ByteArrayServletInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class ByteArrayServletInputStream extends jakarta.servlet.ServletInputStream
Used to be able to read the input stream multiple times. Needed by some IAuthentication implementations.
  • Constructor Details

    • ByteArrayServletInputStream

      public ByteArrayServletInputStream(byte[] bytes)
  • Method Details

    • 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
    • read

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

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

      public void reset() throws IOException
      Overrides:
      reset in class InputStream
      Throws:
      IOException