public class TextWebSocketFrame extends WebSocketFrame
Constructor and Description |
---|
TextWebSocketFrame()
Creates a new empty text frame.
|
TextWebSocketFrame(boolean finalFragment,
int rsv,
io.netty.buffer.ByteBuf binaryData)
Creates a new text frame with the specified binary data and the final fragment flag.
|
TextWebSocketFrame(boolean finalFragment,
int rsv,
String text)
Creates a new text frame with the specified text string.
|
TextWebSocketFrame(io.netty.buffer.ByteBuf binaryData)
Creates a new text frame with the specified binary data.
|
TextWebSocketFrame(String text)
Creates a new text frame with the specified text string.
|
Modifier and Type | Method and Description |
---|---|
TextWebSocketFrame |
copy() |
TextWebSocketFrame |
duplicate() |
TextWebSocketFrame |
replace(io.netty.buffer.ByteBuf content) |
TextWebSocketFrame |
retain() |
TextWebSocketFrame |
retain(int increment) |
TextWebSocketFrame |
retainedDuplicate() |
String |
text()
Returns the text data in this frame.
|
TextWebSocketFrame |
touch() |
TextWebSocketFrame |
touch(Object hint) |
isFinalFragment, rsv, toString
public TextWebSocketFrame()
public TextWebSocketFrame(String text)
text
- String to put in the frame.public TextWebSocketFrame(io.netty.buffer.ByteBuf binaryData)
binaryData
- the content of the frame.public TextWebSocketFrame(boolean finalFragment, int rsv, String text)
finalFragment
- flag indicating if this frame is the final fragmentrsv
- reserved bits used for protocol extensionstext
- String to put in the frame.public TextWebSocketFrame(boolean finalFragment, int rsv, io.netty.buffer.ByteBuf binaryData)
finalFragment
- flag indicating if this frame is the final fragmentrsv
- reserved bits used for protocol extensionsbinaryData
- the content of the frame.public String text()
public TextWebSocketFrame copy()
copy
in interface io.netty.buffer.ByteBufHolder
copy
in class WebSocketFrame
public TextWebSocketFrame duplicate()
duplicate
in interface io.netty.buffer.ByteBufHolder
duplicate
in class WebSocketFrame
public TextWebSocketFrame retainedDuplicate()
retainedDuplicate
in interface io.netty.buffer.ByteBufHolder
retainedDuplicate
in class WebSocketFrame
public TextWebSocketFrame replace(io.netty.buffer.ByteBuf content)
replace
in interface io.netty.buffer.ByteBufHolder
replace
in class WebSocketFrame
public TextWebSocketFrame retain()
retain
in interface io.netty.buffer.ByteBufHolder
retain
in interface io.netty.util.ReferenceCounted
retain
in class WebSocketFrame
public TextWebSocketFrame retain(int increment)
retain
in interface io.netty.buffer.ByteBufHolder
retain
in interface io.netty.util.ReferenceCounted
retain
in class WebSocketFrame
public TextWebSocketFrame touch()
touch
in interface io.netty.buffer.ByteBufHolder
touch
in interface io.netty.util.ReferenceCounted
touch
in class WebSocketFrame
public TextWebSocketFrame touch(Object hint)
touch
in interface io.netty.buffer.ByteBufHolder
touch
in interface io.netty.util.ReferenceCounted
touch
in class WebSocketFrame
Copyright © 2008–2023 The Netty Project. All rights reserved.