Skip to content

//okio/okio/ByteString/Companion

Companion

[jvm] object Companion

Functions

Name Summary
decodeBase64 [jvm]
Content
@JvmStatic()

fun String.decodeBase64():


decodeHex [jvm]
Content
@JvmStatic()

fun String.decodeHex():


encode [jvm]
Brief description
Returns a new ByteString containing the charset-encoded bytes of this String.
Content
@JvmStatic()
@JvmName(name = “encodeString”)

fun String.encode(charset: Charset): ByteString


encodeUtf8 [jvm]
Content
@JvmStatic()

fun String.encodeUtf8(): ByteString


equals [jvm]
Content
open operator override fun equals(other: Any?): Boolean


hashCode [jvm]
Content
open override fun hashCode(): Int


of [jvm]
Content
@JvmStatic()

fun of(vararg data: ByteArray):


readByteString [jvm]
Brief description
Reads count bytes from this InputStream and returns the result.
Content
@JvmStatic()
@JvmName(name = “read”)

fun InputStream.readByteString(byteCount: Int): ByteString


toByteString [jvm]
Content
@JvmStatic()
@JvmName(name = “of”)

fun ByteArray.toByteString(offset: Int, byteCount: Int): ByteString


[jvm]
Brief description
Returns a ByteString containing a copy of this ByteBuffer.
Content
@JvmStatic()
@JvmName(name = “of”)

fun ByteBuffer.toByteString(): ByteString


toString [jvm]
Content
open override fun toString(): String


Properties

Name Summary
EMPTY [jvm] @JvmField()

val EMPTY: ByteString