Package org.zkoss.web.servlet
Class ServletOutputStreamWrapper
- java.lang.Object
-
- java.io.OutputStream
-
- javax.servlet.ServletOutputStream
-
- org.zkoss.web.servlet.ServletOutputStreamWrapper
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class ServletOutputStreamWrapper extends javax.servlet.ServletOutputStreamA facade of OutputStream for implementing ServletOutputStream.- Author:
- tomyeh
-
-
Constructor Summary
Constructors Constructor Description ServletOutputStreamWrapper(java.io.Writer writer, java.lang.String charset)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()static javax.servlet.ServletOutputStreamgetInstance(java.io.OutputStream stream)Returns a facade of the specified stream.static javax.servlet.ServletOutputStreamgetInstance(java.io.Writer writer, java.lang.String charset)Returns a facade of the specified writer.booleanisReady()voidsetWriteListener(javax.servlet.WriteListener writeListener)voidwrite(int b)
-
-
-
Method Detail
-
getInstance
public static javax.servlet.ServletOutputStream getInstance(java.io.OutputStream stream)
Returns a facade of the specified stream.
-
getInstance
public static javax.servlet.ServletOutputStream getInstance(java.io.Writer writer, java.lang.String charset)Returns a facade of the specified writer.- Parameters:
charset- the charset. If null, "UTF-8" is assumed.
-
write
public void write(int b) throws java.io.IOException- Specified by:
writein classjava.io.OutputStream- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Overrides:
flushin classjava.io.OutputStream- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.OutputStream- Throws:
java.io.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
-
-