Package org.zkoss.web.servlet
Class ServletOutputStreamWrapper
java.lang.Object
java.io.OutputStream
javax.servlet.ServletOutputStream
org.zkoss.web.servlet.ServletOutputStreamWrapper
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class ServletOutputStreamWrapper
extends javax.servlet.ServletOutputStream
A facade of OutputStream for implementing ServletOutputStream.
- Author:
- tomyeh
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidflush()static javax.servlet.ServletOutputStreamgetInstance(OutputStream stream) Returns a facade of the specified stream.static javax.servlet.ServletOutputStreamgetInstance(Writer writer, String charset) Returns a facade of the specified writer.booleanisReady()voidsetWriteListener(javax.servlet.WriteListener writeListener) voidwrite(int b) Methods inherited from class javax.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 classjavax.servlet.ServletOutputStream
-
setWriteListener
public void setWriteListener(javax.servlet.WriteListener writeListener) - Specified by:
setWriteListenerin classjavax.servlet.ServletOutputStream
-