public interface WebSocketFrame
A Web Socket frame that represents either text or binary data.
Modifier and Type | Field and Description |
---|---|
static WebSocketFrameFactory |
factory |
Modifier and Type | Method and Description |
---|---|
Buffer |
binaryData() |
static WebSocketFrame |
binaryFrame(Buffer data,
boolean isFinal) |
static WebSocketFrame |
continuationFrame(Buffer data,
boolean isFinal) |
boolean |
isBinary()
Returns
true if and only if the content of this frame is an
arbitrary binary data. |
boolean |
isContinuation() |
boolean |
isFinal()
Returns
true if this is the final frame. |
boolean |
isText()
Returns
true if and only if the content of this frame is a string
encoded in UTF-8. |
String |
textData()
Converts the content of this frame into a UTF-8 string and returns the
converted string.
|
static WebSocketFrame |
textFrame(String str,
boolean isFinal) |
static final WebSocketFrameFactory factory
static WebSocketFrame binaryFrame(Buffer data, boolean isFinal)
static WebSocketFrame textFrame(String str, boolean isFinal)
static WebSocketFrame continuationFrame(Buffer data, boolean isFinal)
boolean isText()
Returns true
if and only if the content of this frame is a string
encoded in UTF-8.
boolean isBinary()
Returns true
if and only if the content of this frame is an
arbitrary binary data.
boolean isContinuation()
String textData()
Converts the content of this frame into a UTF-8 string and returns the converted string.
Buffer binaryData()
boolean isFinal()
Returns true
if this is the final frame. This should be true
unless a number of
coninuation frames are expected to follow this frame.
Copyright © 2014. All Rights Reserved.