Class UpgradeServletInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class UpgradeServletInputStream
    extends jakarta.servlet.ServletInputStream
    Servlet input stream implementation. This stream is non-buffered, and is only used for upgraded requests
    Author:
    Stuart Douglas
    • Constructor Summary

      Constructors 
      Constructor Description
      UpgradeServletInputStream​(org.xnio.channels.StreamSourceChannel channel, io.undertow.connector.ByteBufferPool bufferPool, java.util.concurrent.Executor ioExecutor)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int available()  
      void close()  
      boolean isFinished()  
      boolean isReady()  
      int read()  
      int read​(byte[] b)  
      int read​(byte[] b, int off, int len)  
      void setReadListener​(jakarta.servlet.ReadListener readListener)  
      • Methods inherited from class jakarta.servlet.ServletInputStream

        readLine
      • Methods inherited from class java.io.InputStream

        mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UpgradeServletInputStream

        public UpgradeServletInputStream​(org.xnio.channels.StreamSourceChannel channel,
                                         io.undertow.connector.ByteBufferPool bufferPool,
                                         java.util.concurrent.Executor ioExecutor)
    • Method Detail

      • 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 java.io.IOException
        Specified by:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b)
                 throws java.io.IOException
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • read

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

        public int available()
                      throws java.io.IOException
        Overrides:
        available in class java.io.InputStream
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.io.InputStream
        Throws:
        java.io.IOException