org.jboss.netty.handler.codec.http.websocketx

## Class TextWebSocketFrame

- java.lang.Object
- - org.jboss.netty.handler.codec.http.websocketx.WebSocketFrame
  - - org.jboss.netty.handler.codec.http.websocketx.TextWebSocketFrame

-     public class TextWebSocketFrame
      extends WebSocketFrame

  Web Socket text frame with assumed UTF-8 encoding

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TextWebSocketFrame()` Creates a new empty text frame.
    `TextWebSocketFrame(boolean finalFragment, int rsv, ChannelBuffer binaryData)` Creates a new text frame with the specified binary data.
    `TextWebSocketFrame(boolean finalFragment, int rsv, String text)` Creates a new text frame with the specified text string.
    `TextWebSocketFrame(ChannelBuffer binaryData)` Creates a new text frame with the specified binary data.
    `TextWebSocketFrame(String text)` Creates a new text frame with the specified text string.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getText()` Returns the text data in this frame
    `void` | `setText(String text)` Sets the string for this frame
    `String` | `toString()`

    - ### Methods inherited from class org.jboss.netty.handler.codec.http.websocketx.WebSocketFrame

      `getBinaryData, getRsv, isFinalFragment, setBinaryData, setFinalFragment, setRsv`

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

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

- - ### Constructor Detail

    - #### TextWebSocketFrame

          public TextWebSocketFrame()

      Creates a new empty text frame.

    - #### TextWebSocketFrame

          public TextWebSocketFrame(String text)

      Creates a new text frame with the specified text string. The final fragment flag is set to true.
      Parameters:
        `text` - String to put in the frame

    - #### TextWebSocketFrame

          public TextWebSocketFrame(ChannelBuffer binaryData)

      Creates a new text frame with the specified binary data. The final fragment flag is set to true.
      Parameters:
        `binaryData` - the content of the frame. Must be UTF-8 encoded

    - #### TextWebSocketFrame

          public TextWebSocketFrame(boolean finalFragment,
                            int rsv,
                            String text)

      Creates a new text frame with the specified text string. The final fragment flag is set to true.
      Parameters:
        `finalFragment` - flag indicating if this frame is the final fragment
        `rsv` - reserved bits used for protocol extensions
        `text` - String to put in the frame

    - #### TextWebSocketFrame

          public TextWebSocketFrame(boolean finalFragment,
                            int rsv,
                            ChannelBuffer binaryData)

      Creates a new text frame with the specified binary data. The final fragment flag is set to true.
      Parameters:
        `finalFragment` - flag indicating if this frame is the final fragment
        `rsv` - reserved bits used for protocol extensions
        `binaryData` - the content of the frame. Must be UTF-8 encoded

  - ### Method Detail

    - #### getText

          public String getText()

      Returns the text data in this frame

    - #### setText

          public void setText(String text)

      Sets the string for this frame
      Parameters:
        `text` - text to store

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2008-2012 The Netty Project. All Rights Reserved.