Package io.undertow.servlet.core
Class BlockingWriterSenderImpl
- java.lang.Object
-
- io.undertow.servlet.core.BlockingWriterSenderImpl
-
- All Implemented Interfaces:
io.undertow.io.Sender
public class BlockingWriterSenderImpl extends Object implements io.undertow.io.Sender
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 BlockingWriterSenderImpl(io.undertow.server.HttpServerExchange exchange, PrintWriter writer, String charset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidclose(io.undertow.io.IoCallback callback)voidsend(String data)voidsend(String data, io.undertow.io.IoCallback callback)voidsend(String data, Charset charset)voidsend(String data, Charset charset, io.undertow.io.IoCallback callback)voidsend(ByteBuffer buffer)voidsend(ByteBuffer[] buffer)voidsend(ByteBuffer[] buffer, io.undertow.io.IoCallback callback)voidsend(ByteBuffer buffer, io.undertow.io.IoCallback callback)voidtransferFrom(FileChannel source, io.undertow.io.IoCallback callback)
-
-
-
Field Detail
-
BUFFER_SIZE
public static final int BUFFER_SIZE
TODO: we should be used pooled buffers- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BlockingWriterSenderImpl
public BlockingWriterSenderImpl(io.undertow.server.HttpServerExchange exchange, PrintWriter writer, String charset)
-
-
Method Detail
-
send
public void send(ByteBuffer buffer, io.undertow.io.IoCallback callback)
- Specified by:
sendin interfaceio.undertow.io.Sender
-
send
public void send(ByteBuffer[] buffer, io.undertow.io.IoCallback callback)
- Specified by:
sendin interfaceio.undertow.io.Sender
-
send
public void send(String data, io.undertow.io.IoCallback callback)
- Specified by:
sendin interfaceio.undertow.io.Sender
-
send
public void send(ByteBuffer buffer)
- Specified by:
sendin interfaceio.undertow.io.Sender
-
send
public void send(ByteBuffer[] buffer)
- Specified by:
sendin interfaceio.undertow.io.Sender
-
send
public void send(String data, Charset charset, io.undertow.io.IoCallback callback)
- Specified by:
sendin interfaceio.undertow.io.Sender
-
send
public void send(String data)
- Specified by:
sendin interfaceio.undertow.io.Sender
-
send
public void send(String data, Charset charset)
- Specified by:
sendin interfaceio.undertow.io.Sender
-
transferFrom
public void transferFrom(FileChannel source, io.undertow.io.IoCallback callback)
- Specified by:
transferFromin interfaceio.undertow.io.Sender
-
close
public void close(io.undertow.io.IoCallback callback)
- Specified by:
closein interfaceio.undertow.io.Sender
-
close
public void close()
- Specified by:
closein interfaceio.undertow.io.Sender
-
-