public WebSocketFrame setPayload ( String payload ) { if ( payload == null || payload . length ( ) == 0 ) { return setPayload ( ( byte [ ] ) null ) ; } return setPayload ( Misc . getBytesUTF8 ( payload ) ) ; }
Set the payload . The given string is converted to a byte array in UTF - 8 encoding .