Class ByteString


  • public class ByteString
    extends Object
    Deprecated.
    used as parameter in WebSocketListener and WebSocket. Alternative methods provided in those classes should be used instead.
    Compatibility layer for OkHttp.
    • Method Detail

      • of

        public static ByteString of​(byte... data)
        Deprecated.
        Returns a new ByteString containing a clone of the bytes of data.
      • encodeUtf8

        public static ByteString encodeUtf8​(String s)
        Deprecated.
        Returns a new ByteString containing the UTF-8 bytes of s.
      • utf8

        public final String utf8()
        Deprecated.
        Constructs a new String by decoding the bytes as UTF-8.
      • toByteArray

        public final byte[] toByteArray()
        Deprecated.
        Returns a byte array containing a copy of the bytes in this ByteString.