|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Object org.jboss.netty.handler.codec.http.websocket.DefaultWebSocketFrame
public class DefaultWebSocketFrame
The default WebSocketFrame
implementation.
字段摘要 |
---|
从接口 org.jboss.netty.handler.codec.http.websocket.WebSocketFrame 继承的字段 |
---|
CLOSING_HANDSHAKE |
构造方法摘要 | |
---|---|
DefaultWebSocketFrame()
Creates a new empty text frame. |
|
DefaultWebSocketFrame(int type,
ChannelBuffer binaryData)
Creates a new frame with the specified frame type and the specified data. |
|
DefaultWebSocketFrame(java.lang.String textData)
Creates a new text frame from with the specified string. |
方法摘要 | |
---|---|
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. |
从类 java.lang.Object 继承的方法 |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
构造方法详细信息 |
---|
public DefaultWebSocketFrame()
public DefaultWebSocketFrame(java.lang.String textData)
public DefaultWebSocketFrame(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-8方法详细信息 |
---|
public int getType()
WebSocketFrame
复制的描述0
is the
only allowed type according to the specification.
WebSocketFrame
中的 getType
public boolean isText()
WebSocketFrame
复制的描述true
if and only if the content of this frame is a string
encoded in UTF-8.
WebSocketFrame
中的 isText
public boolean isBinary()
WebSocketFrame
复制的描述true
if and only if the content of this frame is an
arbitrary binary data.
WebSocketFrame
中的 isBinary
public ChannelBuffer getBinaryData()
WebSocketFrame
复制的描述
WebSocketFrame
中的 getBinaryData
public java.lang.String getTextData()
WebSocketFrame
复制的描述
WebSocketFrame
中的 getTextData
public void setData(int type, ChannelBuffer binaryData)
WebSocketFrame
复制的描述
WebSocketFrame
中的 setData
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.public java.lang.String toString()
WebSocketFrame
复制的描述WebSocketFrame.getTextData()
.
WebSocketFrame
中的 toString
java.lang.Object
中的 toString
|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |