Package-level declarations
Types
An immutable wrapper around a byte sequence providing String like functionality.
A helper class facilitating ByteString construction.
Functions
Appends bytes to this builder.
Appends unsigned byte to this builder.
Appends a byte string to this builder.
Returns a new read-only heap ByteBuffer wrapping this ByteString's content.
Builds new byte string by populating newly created ByteStringBuilder initialized with the given capacity using provided builderAction and then converting it to ByteString.
Wraps given bytes into a byte string.
Returns true
if the content of this byte string equals to the array.
Decodes symbols from the specified source byte string or its subrange and writes resulting bytes into the destination array. Returns the number of bytes written.
Decodes symbols from the specified source byte string or its subrange. Returns a ByteString containing the resulting bytes.
Decodes symbols from the specified source char sequence or its substring. Returns a ByteString containing the resulting bytes.
Decodes content of a byte string into a string using UTF-8 encoding.
Decodes the content of a byte string to a string using given charset.
Encodes bytes from the specified source byte string or its subrange and writes resulting symbols into the destination array. Returns the number of symbols written.
Encodes bytes from the specified source byte string or its subrange and appends resulting symbols to the destination appendable. Returns the destination appendable.
Encodes a string into a byte sequence using UTF8-encoding and wraps it into a byte string.
Encodes a string into a byte string using charset.
Returns true if this byte string ends with the suffix specified by the byteArray.
Returns true if this byte string ends with the suffix specified by the byteString.
Reads length bytes of data from this ByteBuffer starting from the current position and wraps them into a new ByteString.
Reads length bytes of data from this ByteBuffer starting from at index and wraps them into a new ByteString.
Parses bytes from this string using the specified HexFormat.
Returns the index within this byte string of the first occurrence of the specified byte, starting from the specified startIndex. If the byte not found, -1
is returned.
Returns the index within this byte string of the first occurrence of the specified byteArray, starting from the specified startIndex. If the byteArray not found, -1
is returned.
Returns the index within this byte string of the first occurrence of the specified byteString, starting from the specified startIndex. If the byteString not found, -1
is returned.
Returns true
if this byte string is empty.
Returns true
if this byte string is not empty.
Returns the index within this char sequence of the last occurrence of the specified byte, starting from the specified startIndex. If the byte not found, -1
is returned.
Returns the index within this char sequence of the last occurrence of the specified byteArray, starting from the specified startIndex. If the byteArray not found, -1
is returned.
Returns the index within this char sequence of the last occurrence of the specified byteString, starting from the specified startIndex. If the byteString not found, -1
is returned.
Returns true if this byte string starts with the prefix specified by the byteArray.
Returns true if this byte string starts with the prefix specified by the byteString.
Returns a new ByteString holding data copied from this NSData.
Formats bytes in this byte string using the specified format.
Formats bytes in this byte string using the specified HexFormat.
Returns a new NSData instance initialized with bytes copied from this ByteString.