Top Description Methods
io.vertx.core.http.impl.ws

public Interface WebSocketFrameInternal

extends WebSocketFrame
Known Direct Implementers
io.vertx.core.http.impl.ws.WebSocketFrameImpl
Imports
io.netty.buffer.ByteBuf, io.vertx.core.http.WebSocketFrame

A Web Socket frame that represents either text or binary data.
Authors
The Netty Project, Trustin Lee
Version
$Rev: 2080 $, $Date: 2010-01-26 18:04:19 +0900 (Tue, 26 Jan 2010) $

Method Summary

Modifier and TypeMethod and Description
public ByteBuf
getBinaryData()

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

public int

Returns:

the frame binary data length
length
()

public void
setBinaryData(ByteBuf
the content of the frame. If (type & 0x80 == 0), it must be encoded in UTF-8.
binaryData
)

Sets the type and the content of this frame.

public void
setTextData(String
the content of the frame. Must be valid UTF-8
textData
)

Set the type of the content of this frame and populate it with the given content

Inherited from io.vertx.core.http.WebSocketFrame:
binaryDatabinaryFramecloseReasoncloseStatusCodecontinuationFrameisBinaryisCloseisContinuationisFinalisPingisTextpingFramepongFrametextDatatextFrametype

Method Detail

getBinaryDataback to summary
public ByteBuf getBinaryData()

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

lengthback to summary
public int length()
Returns:int

the frame binary data length

setBinaryDataback to summary
public void setBinaryData(ByteBuf binaryData)

Sets the type and the content of this frame.

Parameters
binaryData:ByteBuf

the content of the frame. If (type & 0x80 == 0), it must be encoded in UTF-8.

Exceptions
IllegalArgumentException:
if If (type & 0x80 == 0) and the data is not encoded in UTF-8
setTextDataback to summary
public void setTextData(String textData)

Set the type of the content of this frame and populate it with the given content

Parameters
textData:String

the content of the frame. Must be valid UTF-8