public CharSequence nextText() throws IOException {
        WebSocketMessageType msgType = null;
        
        while ((msgType = _messageReader.next()) != WebSocketMessageType.EOS) {
            if (msgType == WebSocketMessageType.TEXT) {
                return _messageReader.getText();
            }
        }

        return null;
    }
public CharSequence nextText ( ) throws IOException { WebSocketMessageType msgType = null ; while ( ( msgType = _messageReader . next ( ) ) != WebSocketMessageType . EOS ) { if ( msgType == WebSocketMessageType . TEXT ) { return _messageReader . getText ( ) ; } } return null ; }
Returns the next text message received on this connection. This method
will block till a text message is received. Any binary messages that may
arrive will be ignored. A null is returned when the connection is closed.
<p>
An IOException is thrown if the connection has not been established
before invoking this method.

@return CharSequence     the payload of the text message
@throws IOException    if the connection has not been established