Class MockServletOutputStream

java.lang.Object
java.io.OutputStream
jakarta.servlet.ServletOutputStream
io.github.cdiunit.internal.servlet6.MockServletOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class MockServletOutputStream extends jakarta.servlet.ServletOutputStream
Mock implementation of ServletOutputStream.
  • Constructor Details

    • MockServletOutputStream

      public MockServletOutputStream()
    • MockServletOutputStream

      public MockServletOutputStream(String encoding)
  • Method Details

    • setEncoding

      public void setEncoding(String encoding)
    • write

      public void write(int value) throws IOException
      Specified by:
      write in class OutputStream
      Throws:
      IOException
    • getContent

      public String getContent()
    • getBinaryContent

      public byte[] getBinaryContent()
    • clearContent

      public void clearContent()
    • isReady

      public boolean isReady()
      Specified by:
      isReady in class jakarta.servlet.ServletOutputStream
    • setWriteListener

      public void setWriteListener(jakarta.servlet.WriteListener writeListener)
      Specified by:
      setWriteListener in class jakarta.servlet.ServletOutputStream