Top Description Fields Constructors Methods
io.undertow.websockets.core

public Class BufferedTextMessage

extends Object
Class Inheritance
Imports
org.xnio.ChannelListener, io.undertow.connector.PooledByteBuffer, java.io.IOException, java.nio.ByteBuffer

A buffered text message.
Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
private final boolean
private boolean
pack-priv long
private final UTF8Output
private final long

Constructor Summary

AccessConstructor and Description
public
BufferedTextMessage(long
The maximum message size
maxMessageSize
,
boolean
If the complete message should be buffered
bufferFullMessage
)

public
BufferedTextMessage(boolean bufferFullMessage)

Method Summary

Modifier and TypeMethod and Description
private void
public String

Returns:

The data
getData
()

Gets the buffered data and clears the buffered text message.

public boolean
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferFullMessageback to summary
private final boolean bufferFullMessage
completeback to summary
private boolean complete
currentSizeback to summary
pack-priv long currentSize
databack to summary
private final UTF8Output data
maxMessageSizeback to summary
private final long maxMessageSize

Constructor Detail

BufferedTextMessageback to summary
public BufferedTextMessage(long maxMessageSize, boolean bufferFullMessage)
Parameters
maxMessageSize:long

The maximum message size

bufferFullMessage:boolean

If the complete message should be buffered

BufferedTextMessageback to summary
public BufferedTextMessage(boolean bufferFullMessage)

Method Detail

checkMaxSizeback to summary
private void checkMaxSize(StreamSourceFrameChannel channel, int res) throws IOException
getDataback to summary
public 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:String

The data

isCompleteback to summary
public boolean isComplete()
readback to summary
public void read(final StreamSourceFrameChannel channel, final WebSocketCallback<BufferedTextMessage> callback)
readBlockingback to summary
public void readBlocking(StreamSourceFrameChannel channel) throws IOException