org.vertx.java.core.http.impl.ws

## Interface WebSocketFrame

All Known Implementing Classes:
  DefaultWebSocketFrame

    public interface WebSocketFrame

A Web Socket frame that represents either text or binary data.

### Nested Class Summary

Nested Classes
`static class` `WebSocketFrame.FrameType` List of all frame types.

### Method Summary

Methods
`org.jboss.netty.buffer.ChannelBuffer` `getBinaryData()` Returns the content of this frame as-is, with no UTF-8 decoding.
`java.lang.String` `getTextData()` Converts the content of this frame into a UTF-8 string and returns the converted string.
`WebSocketFrame.FrameType` `getType()`
`boolean` `isBinary()` Returns `true` if and only if the content of this frame is an arbitrary binary data.
`boolean` `isText()` Returns `true` if and only if the content of this frame is a string encoded in UTF-8.
`void` `setBinaryData(org.jboss.netty.buffer.ChannelBuffer binaryData)` Sets the type and the content of this frame.
`void` `setTextData(java.lang.String textData)`
`java.lang.String` `toString()` Returns the string representation of this frame.

### Method Detail

#### getType

    WebSocketFrame.FrameType getType()

#### isText

    boolean isText()

Returns `true` if and only if the content of this frame is a string encoded in UTF-8.

#### isBinary

    boolean isBinary()

Returns `true` if and only if the content of this frame is an arbitrary binary data.

#### getBinaryData

    org.jboss.netty.buffer.ChannelBuffer getBinaryData()

Returns the content of this frame as-is, with no UTF-8 decoding.

#### getTextData

    java.lang.String getTextData()

Converts the content of this frame into a UTF-8 string and returns the converted string.

#### setBinaryData

    void setBinaryData(org.jboss.netty.buffer.ChannelBuffer binaryData)

Sets the type and the content of this frame.

Parameters:
  `binaryData` - the content of the frame. If `(type & 0x80 == 0)`, it must be encoded in UTF-8.
Throws:
  `java.lang.IllegalArgumentException` - if If `(type & 0x80 == 0)` and the data is not encoded in UTF-8

#### setTextData

    void setTextData(java.lang.String textData)

#### toString

    java.lang.String toString()

Returns the string representation of this frame. Please note that this method is not identical to `getTextData()`.

Overrides:
  `toString` in class `java.lang.Object`