Class MessageWriter
- java.lang.Object
-
- java.io.Writer
-
- org.eclipse.jetty.websocket.common.message.MessageWriter
-
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
public class MessageWriter extends Writer
Support for writing a single WebSocket TEXT message via aWriterNote: Per WebSocket spec, all WebSocket TEXT messages must be encoded in UTF-8
-
-
Constructor Summary
Constructors Constructor Description MessageWriter(org.eclipse.jetty.websocket.api.extensions.OutgoingFrames outgoing, int bufferSize, org.eclipse.jetty.io.ByteBufferPool bufferPool)MessageWriter(WebSocketSession session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()voidsetCallback(org.eclipse.jetty.websocket.api.WriteCallback callback)voidwrite(char[] chars, int off, int len)voidwrite(int c)
-
-
-
Constructor Detail
-
MessageWriter
public MessageWriter(WebSocketSession session)
-
MessageWriter
public MessageWriter(org.eclipse.jetty.websocket.api.extensions.OutgoingFrames outgoing, int bufferSize, org.eclipse.jetty.io.ByteBufferPool bufferPool)
-
-
Method Detail
-
write
public void write(char[] chars, int off, int len) throws IOException- Specified by:
writein classWriter- Throws:
IOException
-
write
public void write(int c) throws IOException- Overrides:
writein classWriter- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Specified by:
flushin classWriter- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classWriter- Throws:
IOException
-
setCallback
public void setCallback(org.eclipse.jetty.websocket.api.WriteCallback callback)
-
-