|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
public interface WebSocketFrame
A Web Socket frame that represents either text or binary data.
字段摘要 | |
---|---|
static WebSocketFrame |
CLOSING_HANDSHAKE
Closing handshake message (0xFF, 0x00) |
方法摘要 | |
---|---|
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. |
int |
getType()
Returns the type of this frame. |
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 |
setData(int type,
ChannelBuffer binaryData)
Sets the type and the content of this frame. |
java.lang.String |
toString()
Returns the string representation of this frame. |
字段详细信息 |
---|
static final WebSocketFrame CLOSING_HANDSHAKE
方法详细信息 |
---|
int getType()
0
is the
only allowed type according to the specification.
boolean isText()
true
if and only if the content of this frame is a string
encoded in UTF-8.
boolean isBinary()
true
if and only if the content of this frame is an
arbitrary binary data.
ChannelBuffer getBinaryData()
java.lang.String getTextData()
void setData(int type, ChannelBuffer binaryData)
type
- the type of the frame. 0
is the only allowed type currently.binaryData
- the content of the frame. If (type & 0x80 == 0),
it must be encoded in UTF-8.
java.lang.IllegalArgumentException
- if If (type & 0x80 == 0) and the data is not encoded
in UTF-8java.lang.String toString()
getTextData()
.
java.lang.Object
中的 toString
|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |