Top Description Constructors Methods
io.netty.handler.codec.http.websocketx

public Class TextWebSocketFrame

extends WebSocketFrame
Class Inheritance
Imports
io.netty.buffer.ByteBuf, .Unpooled, io.netty.util.CharsetUtil

Web Socket text frame.

Constructor Summary

AccessConstructor and Description
public
TextWebSocketFrame()

Creates a new empty text frame.

public
TextWebSocketFrame(String
String to put in the frame.
text
)

Creates a new text frame with the specified text string.

public
TextWebSocketFrame(ByteBuf
the content of the frame.
binaryData
)

Creates a new text frame with the specified binary data.

public
TextWebSocketFrame(boolean
flag indicating if this frame is the final fragment
finalFragment
,
int
reserved bits used for protocol extensions
rsv
,
String
String to put in the frame.
text
)

Creates a new text frame with the specified text string.

public
TextWebSocketFrame(boolean
flag indicating if this frame is the final fragment
finalFragment
,
int
reserved bits used for protocol extensions
rsv
,
ByteBuf
the content of the frame.
binaryData
)

Creates a new text frame with the specified binary data and the final fragment flag.

Method Summary

Modifier and TypeMethod and Description
public TextWebSocketFrame
public TextWebSocketFrame
private static ByteBuf
public TextWebSocketFrame
replace(ByteBuf content)

Implements abstract io.netty.handler.codec.http.websocketx.WebSocketFrame.replace.

Implements io.netty.buffer.ByteBufHolder.replace.

Returns a new ByteBufHolder which contains the specified content.
public TextWebSocketFrame
public TextWebSocketFrame
retain(int increment)

Overrides io.netty.handler.codec.http.websocketx.WebSocketFrame.retain.

Implements io.netty.buffer.ByteBufHolder.retain.

Increases the reference count by the specified increment.
public TextWebSocketFrame
public String
text()

Returns the text data in this frame.

public TextWebSocketFrame
touch()

Overrides io.netty.handler.codec.http.websocketx.WebSocketFrame.touch.

Implements io.netty.buffer.ByteBufHolder.touch.

Records the current access location of this object for debugging purposes.
public TextWebSocketFrame
touch(Object hint)

Overrides io.netty.handler.codec.http.websocketx.WebSocketFrame.touch.

Implements io.netty.buffer.ByteBufHolder.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes.
Inherited from io.netty.handler.codec.http.websocketx.WebSocketFrame:
isFinalFragmentrsvtoString

Constructor Detail

TextWebSocketFrameback to summary
public TextWebSocketFrame()

Creates a new empty text frame.

TextWebSocketFrameback to summary
public TextWebSocketFrame(String text)

Creates a new text frame with the specified text string. The final fragment flag is set to true.

Parameters
text:String

String to put in the frame.

TextWebSocketFrameback to summary
public TextWebSocketFrame(ByteBuf binaryData)

Creates a new text frame with the specified binary data. The final fragment flag is set to true.

Parameters
binaryData:ByteBuf

the content of the frame.

TextWebSocketFrameback to summary
public TextWebSocketFrame(boolean finalFragment, int rsv, String text)

Creates a new text frame with the specified text string. The final fragment flag is set to true.

Parameters
finalFragment:boolean

flag indicating if this frame is the final fragment

rsv:int

reserved bits used for protocol extensions

text:String

String to put in the frame.

TextWebSocketFrameback to summary
public TextWebSocketFrame(boolean finalFragment, int rsv, ByteBuf binaryData)

Creates a new text frame with the specified binary data and the final fragment flag.

Parameters
finalFragment:boolean

flag indicating if this frame is the final fragment

rsv:int

reserved bits used for protocol extensions

binaryData:ByteBuf

the content of the frame.

Method Detail

copyback to summary
public TextWebSocketFrame copy()

Overrides io.netty.handler.codec.http.websocketx.WebSocketFrame.copy.

Implements io.netty.buffer.ByteBufHolder.copy.

Doc from io.netty.buffer.DefaultByteBufHolder.copy.

Creates a deep copy of this ByteBufHolder.

This method calls replace(content().copy()) by default.

Annotations
@Override
duplicateback to summary
public TextWebSocketFrame duplicate()

Overrides io.netty.handler.codec.http.websocketx.WebSocketFrame.duplicate.

Implements io.netty.buffer.ByteBufHolder.duplicate.

Doc from io.netty.buffer.DefaultByteBufHolder.duplicate.

Duplicates this ByteBufHolder. Be aware that this will not automatically call retain().

This method calls replace(content().duplicate()) by default.

Annotations
@Override
fromTextback to summary
private static ByteBuf fromText(String text)
replaceback to summary
public TextWebSocketFrame replace(ByteBuf content)

Implements abstract io.netty.handler.codec.http.websocketx.WebSocketFrame.replace.

Implements io.netty.buffer.ByteBufHolder.replace.

Doc from io.netty.buffer.DefaultByteBufHolder.replace.

Returns a new ByteBufHolder which contains the specified content.

Override this method to return a new instance of this object whose content is set to the specified content. The default implementation of copy(), duplicate() and retainedDuplicate() invokes this method to create a copy.

Annotations
@Override
retainback to summary
public TextWebSocketFrame retain()

Overrides io.netty.handler.codec.http.websocketx.WebSocketFrame.retain.

Implements io.netty.buffer.ByteBufHolder.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by 1.

Annotations
@Override
retainback to summary
public TextWebSocketFrame retain(int increment)

Overrides io.netty.handler.codec.http.websocketx.WebSocketFrame.retain.

Implements io.netty.buffer.ByteBufHolder.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by the specified increment.

Annotations
@Override
retainedDuplicateback to summary
public TextWebSocketFrame retainedDuplicate()

Overrides io.netty.handler.codec.http.websocketx.WebSocketFrame.retainedDuplicate.

Implements io.netty.buffer.ByteBufHolder.retainedDuplicate.

Doc from io.netty.buffer.DefaultByteBufHolder.retainedDuplicate.

Duplicates this ByteBufHolder. This method returns a retained duplicate unlike duplicate().

This method calls replace(content().retainedDuplicate()) by default.

Annotations
@Override
textback to summary
public String text()

Returns the text data in this frame.

touchback to summary
public TextWebSocketFrame touch()

Overrides io.netty.handler.codec.http.websocketx.WebSocketFrame.touch.

Implements io.netty.buffer.ByteBufHolder.touch.

Doc from io.netty.util.ReferenceCounted.touch.

Records the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector. This method is a shortcut to touch(null).

Annotations
@Override
touchback to summary
public TextWebSocketFrame touch(Object hint)

Overrides io.netty.handler.codec.http.websocketx.WebSocketFrame.touch.

Implements io.netty.buffer.ByteBufHolder.touch.

Doc from io.netty.util.ReferenceCounted.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector.

Annotations
@Override