Package io.undertow.servlet.core
Class WriterOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- io.undertow.servlet.core.WriterOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class WriterOutputStream extends OutputStream
A sender that uses a print writer.In general this should never be used. It exists for the edge case where a filter has called getWriter() and then the default servlet is being used to serve a text file.
- Author:
- Stuart Douglas
-
-
Field Summary
Fields Modifier and Type Field Description static intBUFFER_SIZETODO: we should be used pooled buffers
-
Constructor Summary
Constructors Constructor Description WriterOutputStream(io.undertow.server.HttpServerExchange exchange, PrintWriter writer, String charset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwrite(byte[] b)voidwrite(byte[] b, int off, int len)voidwrite(int b)-
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream
-
-
-
-
Field Detail
-
BUFFER_SIZE
public static final int BUFFER_SIZE
TODO: we should be used pooled buffers- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WriterOutputStream
public WriterOutputStream(io.undertow.server.HttpServerExchange exchange, PrintWriter writer, String charset)
-
-
Method Detail
-
write
public void write(int b) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
write
public void write(byte[] b, int off, int len) throws IOException- Overrides:
writein classOutputStream- Throws:
IOException
-
-