Class TextWebSocketFrame

  • All Implemented Interfaces:
    io.netty.buffer.ByteBufHolder, io.netty.util.ReferenceCounted

    public class TextWebSocketFrame
    extends WebSocketFrame
    Web Socket text frame.
    • Constructor Detail

      • TextWebSocketFrame

        public TextWebSocketFrame()
        Creates a new empty text frame.
      • TextWebSocketFrame

        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 to put in the frame.
      • TextWebSocketFrame

        public TextWebSocketFrame​(io.netty.buffer.ByteBuf binaryData)
        Creates a new text frame with the specified binary data. The final fragment flag is set to true.
        Parameters:
        binaryData - the content of the frame.
      • TextWebSocketFrame

        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 - flag indicating if this frame is the final fragment
        rsv - reserved bits used for protocol extensions
        text - String to put in the frame.
      • TextWebSocketFrame

        public 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.
        Parameters:
        finalFragment - flag indicating if this frame is the final fragment
        rsv - reserved bits used for protocol extensions
        binaryData - the content of the frame.
    • Method Detail

      • text

        public String text()
        Returns the text data in this frame.
      • replace

        public TextWebSocketFrame replace​(io.netty.buffer.ByteBuf content)
        Specified by:
        replace in interface io.netty.buffer.ByteBufHolder
        Specified by:
        replace in class WebSocketFrame
      • retain

        public TextWebSocketFrame retain()
        Specified by:
        retain in interface io.netty.buffer.ByteBufHolder
        Specified by:
        retain in interface io.netty.util.ReferenceCounted
        Overrides:
        retain in class WebSocketFrame
      • retain

        public TextWebSocketFrame retain​(int increment)
        Specified by:
        retain in interface io.netty.buffer.ByteBufHolder
        Specified by:
        retain in interface io.netty.util.ReferenceCounted
        Overrides:
        retain in class WebSocketFrame
      • touch

        public TextWebSocketFrame touch()
        Specified by:
        touch in interface io.netty.buffer.ByteBufHolder
        Specified by:
        touch in interface io.netty.util.ReferenceCounted
        Overrides:
        touch in class WebSocketFrame
      • touch

        public TextWebSocketFrame touch​(Object hint)
        Specified by:
        touch in interface io.netty.buffer.ByteBufHolder
        Specified by:
        touch in interface io.netty.util.ReferenceCounted
        Overrides:
        touch in class WebSocketFrame