Class MockServletOutputStream
java.lang.Object
java.io.OutputStream
jakarta.servlet.ServletOutputStream
io.github.cdiunit.internal.servlet5.MockServletOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class MockServletOutputStream
extends jakarta.servlet.ServletOutputStream
Mock implementation of
ServletOutputStream
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
byte[]
boolean
isReady()
void
setEncoding
(String encoding) void
setWriteListener
(jakarta.servlet.WriteListener writeListener) void
write
(int value) Methods inherited from class jakarta.servlet.ServletOutputStream
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write, write
-
Constructor Details
-
MockServletOutputStream
public MockServletOutputStream() -
MockServletOutputStream
-
-
Method Details
-
setEncoding
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
getContent
-
getBinaryContent
public byte[] getBinaryContent() -
clearContent
public void clearContent() -
isReady
public boolean isReady()- Specified by:
isReady
in classjakarta.servlet.ServletOutputStream
-
setWriteListener
public void setWriteListener(jakarta.servlet.WriteListener writeListener) - Specified by:
setWriteListener
in classjakarta.servlet.ServletOutputStream
-