io.vertx.rxjava.core.http

## Class WebSocketFrame

- java.lang.Object
- - io.vertx.rxjava.core.http.WebSocketFrame

-     public class WebSocketFrame
      extends Object

  A WebSocket frame that represents either text or binary data.

  A WebSocket message is composed of one or more WebSocket frames.

  If there is a just a single frame in the message then a single text or binary frame should be created with final = true.

  If there are more than one frames in the message, then the first frame should be a text or binary frame with final = false, followed by one or more continuation frames. The last continuation frame should have final = true.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WebSocketFrame(WebSocketFrame delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Buffer` | `binaryData()`
    `static WebSocketFrame` | `binaryFrame(Buffer data, boolean isFinal)` Create a binary WebSocket frame.
    `static WebSocketFrame` | `continuationFrame(Buffer data, boolean isFinal)` Create a continuation frame
    `Object` | `getDelegate()`
    `boolean` | `isBinary()`
    `boolean` | `isContinuation()`
    `boolean` | `isFinal()`
    `boolean` | `isText()`
    `static WebSocketFrame` | `newInstance(WebSocketFrame arg)`
    `String` | `textData()`
    `static WebSocketFrame` | `textFrame(String str, boolean isFinal)` Create a text WebSocket frame.

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

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

- - ### Constructor Detail

    - #### WebSocketFrame

          public WebSocketFrame(WebSocketFrame delegate)

  - ### Method Detail

    - #### getDelegate

          public Object getDelegate()

    - #### binaryFrame

          public static WebSocketFrame binaryFrame(Buffer data,
                                                   boolean isFinal)

      Create a binary WebSocket frame.
      Parameters:
        `data` - the data for the frame
        `isFinal` - true if it's the final frame in the WebSocket message
      Returns:
        the frame

    - #### textFrame

          public static WebSocketFrame textFrame(String str,
                                                 boolean isFinal)

      Create a text WebSocket frame.
      Parameters:
        `str` - the string for the frame
        `isFinal` - true if it's the final frame in the WebSocket message
      Returns:
        the frame

    - #### continuationFrame

          public static WebSocketFrame continuationFrame(Buffer data,
                                                         boolean isFinal)

      Create a continuation frame
      Parameters:
        `data` - the data for the frame
        `isFinal` - true if it's the final frame in the WebSocket message
      Returns:
        the frame

    - #### isText

          public boolean isText()

      Returns:
        true if it's a text frame

    - #### isBinary

          public boolean isBinary()

      Returns:
        true if it's a binary frame

    - #### isContinuation

          public boolean isContinuation()

      Returns:
        true if it's a continuation frame

    - #### textData

          public String textData()

      Returns:
        the content of this frame as a UTF-8 string and returns the converted string. Only use this for text frames.

    - #### binaryData

          public Buffer binaryData()

      Returns:
        the data of the frame

    - #### isFinal

          public boolean isFinal()

      Returns:
        true if this is the final frame.

    - #### newInstance

          public static WebSocketFrame newInstance(WebSocketFrame arg)

Copyright © 2016. All rights reserved.