io.undertow.websockets.core

## Class BufferedTextMessage

- java.lang.Object
- - io.undertow.websockets.core.BufferedTextMessage

    public class BufferedTextMessage
    extends Object

A buffered text message.

Author:
  Stuart Douglas

### Constructor Summary

Constructors
Constructor and Description
`BufferedTextMessage(boolean bufferFullMessage)`
`BufferedTextMessage(long maxMessageSize, boolean bufferFullMessage)`

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getData()` Gets the buffered data and clears the buffered text message.
`boolean` `isComplete()`
`void` `read(StreamSourceFrameChannel channel, WebSocketCallback<BufferedTextMessage> callback)`
`void` `readBlocking(StreamSourceFrameChannel channel)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### BufferedTextMessage

    public BufferedTextMessage(long maxMessageSize,
                               boolean bufferFullMessage)

Parameters:
  `maxMessageSize` - The maximum message size
  `bufferFullMessage` - If the complete message should be buffered

#### BufferedTextMessage

    public BufferedTextMessage(boolean bufferFullMessage)

### Method Detail

#### readBlocking

    public void readBlocking(StreamSourceFrameChannel channel)
                      throws IOException

Throws:
  `IOException`

#### read

    public void read(StreamSourceFrameChannel channel,
                     WebSocketCallback<BufferedTextMessage> callback)

#### getData

    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:
  The data

#### isComplete

    public boolean isComplete()