Package org.zkoss.web.servlet
Class ServletOutputStreamWrapper
java.lang.Object
java.io.OutputStream
jakarta.servlet.ServletOutputStream
org.zkoss.web.servlet.ServletOutputStreamWrapper
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class ServletOutputStreamWrapper
extends jakarta.servlet.ServletOutputStream
A facade of OutputStream for implementing ServletOutputStream.
- Author:
- tomyeh
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidflush()static jakarta.servlet.ServletOutputStreamgetInstance(OutputStream stream) Returns a facade of the specified stream.static jakarta.servlet.ServletOutputStreamgetInstance(Writer writer, String charset) Returns a facade of the specified writer.booleanisReady()voidsetWriteListener(jakarta.servlet.WriteListener writeListener) voidwrite(int b) Methods inherited from class jakarta.servlet.ServletOutputStream
print, print, print, print, print, print, print, println, println, println, println, println, println, println, printlnMethods inherited from class java.io.OutputStream
nullOutputStream, write, write
-
Constructor Details
-
ServletOutputStreamWrapper
- Parameters:
charset- the charset. If null, "UTF-8" is assumed.
-
-
Method Details
-
getInstance
Returns a facade of the specified stream. -
getInstance
Returns a facade of the specified writer.- Parameters:
charset- the charset. If null, "UTF-8" is assumed.
-
write
- Specified by:
writein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
isReady
public boolean isReady()- Specified by:
isReadyin classjakarta.servlet.ServletOutputStream
-
setWriteListener
public void setWriteListener(jakarta.servlet.WriteListener writeListener) - Specified by:
setWriteListenerin classjakarta.servlet.ServletOutputStream
-