Class CachedServletInputStream

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

    public class CachedServletInputStream
    extends javax.servlet.ServletInputStream
    An inputstream which reads the cached request body and has mutable request URI and params.
    Author:
    Daniel Koch, terrestris GmbH & Co. KG
    • Constructor Summary

      Constructors 
      Constructor Description
      CachedServletInputStream​(java.io.ByteArrayOutputStream cachedBytes)
      Create a new input stream from the cached request body
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isFinished()  
      boolean isReady()  
      int read()  
      void setReadListener​(javax.servlet.ReadListener readListener)  
      • Methods inherited from class javax.servlet.ServletInputStream

        readLine
      • Methods inherited from class java.io.InputStream

        available, close, mark, markSupported, nullInputStream, read, read, 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

      • CachedServletInputStream

        public CachedServletInputStream​(java.io.ByteArrayOutputStream cachedBytes)
        Create a new input stream from the cached request body
    • Method Detail

      • read

        public int read()
                 throws java.io.IOException
        Specified by:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • isFinished

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

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

        public void setReadListener​(javax.servlet.ReadListener readListener)
        Specified by:
        setReadListener in class javax.servlet.ServletInputStream