Package io.undertow.websockets.core
Class BufferedTextMessage
- java.lang.Object
-
- io.undertow.websockets.core.BufferedTextMessage
-
public class BufferedTextMessage extends java.lang.ObjectA buffered text message.- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description BufferedTextMessage(boolean bufferFullMessage)BufferedTextMessage(long maxMessageSize, boolean bufferFullMessage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetData()Gets the buffered data and clears the buffered text message.booleanisComplete()voidread(StreamSourceFrameChannel channel, WebSocketCallback<BufferedTextMessage> callback)voidreadBlocking(StreamSourceFrameChannel channel)
-
-
-
Constructor Detail
-
BufferedTextMessage
public BufferedTextMessage(long maxMessageSize, boolean bufferFullMessage)- Parameters:
maxMessageSize- The maximum message sizebufferFullMessage- If the complete message should be buffered
-
BufferedTextMessage
public BufferedTextMessage(boolean bufferFullMessage)
-
-
Method Detail
-
readBlocking
public void readBlocking(StreamSourceFrameChannel channel) throws java.io.IOException
- Throws:
java.io.IOException
-
read
public void read(StreamSourceFrameChannel channel, WebSocketCallback<BufferedTextMessage> callback)
-
getData
public java.lang.String getData()
Gets the buffered data and clears the buffered text message. If this is not called on a UTF8 character boundary there may be partial code point data that is still buffered.- Returns:
- The data
-
isComplete
public boolean isComplete()
-
-