org.springframework.mock.web

Class DelegatingServletOutputStream

    • Constructor Detail

      • DelegatingServletOutputStream

        public DelegatingServletOutputStream(java.io.OutputStream targetStream)
        Create a DelegatingServletOutputStream for the given target stream.
        Parameters:
        targetStream - the target stream (never null)
    • Method Detail

      • getTargetStream

        public final java.io.OutputStream getTargetStream()
        Return the underlying target stream (never null).
      • write

        public void write(int b)
                   throws java.io.IOException
        Specified by:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface java.io.Flushable
        Overrides:
        flush in class java.io.OutputStream
        Throws:
        java.io.IOException
      • close

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

        public boolean isReady()
        Description copied from class: javax.servlet.ServletOutputStream
        This method can be used to determine if data can be written without blocking.
        Specified by:
        isReady in class ServletOutputStream
        Returns:
        true if a write to this ServletOutputStream will succeed, otherwise returns false.