Decodes the Base64-encoded bytes and returns their value as a byte string.
Decodes the hex-encoded bytes and returns their value a byte string.
Returns a new byte string containing the charset-encoded bytes of s.
Returns a new byte string containing the UTF-8 bytes of s.
Returns the hash of the bytes accepted thus far and resets the internal state of this sink.
Returns the hash of the bytes supplied thus far and resets the internal state of this source.
Returns the 160-bit SHA-1 HMAC of this buffer.
Returns the 160-bit SHA-1 HMAC of this byte string.
Returns the 256-bit SHA-256 HMAC of this buffer.
Returns the 256-bit SHA-256 HMAC of this byte string.
Returns the 512-bit SHA-512 HMAC of this buffer.
Returns the 512-bit SHA-512 HMAC of this byte string.
Returns the 128-bit MD5 hash of this buffer.
Returns the 128-bit MD5 hash of this byte string.
ByteString.of(byte... data)
Returns a new byte string containing a clone of the bytes of data.
ByteString.of(byte[] data,
int offset,
int byteCount)
Returns a new byte string containing a copy of byteCount bytes of data starting
at offset.
Reads count bytes from in and returns the result.
Removes all bytes bytes from this and returns them as a byte string.
Removes byteCount bytes from this and returns them as a byte string.
Returns the 160-bit SHA-1 hash of this buffer.
Returns the 160-bit SHA-1 hash of this byte string.
Returns the 256-bit SHA-256 hash of this buffer.
Returns the 256-bit SHA-256 hash of this byte string.
Returns the 512-bit SHA-512 hash of this buffer.
Returns the 512-bit SHA-512 hash of this byte string.
Returns an immutable copy of this buffer as a byte string.
Returns an immutable copy of the first byteCount bytes of this buffer as a byte string.
Returns a byte string that is a substring of this byte string, beginning at the specified
index until the end of this string.
ByteString.substring(int beginIndex,
int endIndex)
Returns a byte string that is a substring of this byte string, beginning at the specified
beginIndex and ends at the specified endIndex.
Returns a byte string equal to this byte string, but with the bytes 'A'
through 'Z' replaced with the corresponding byte in 'a' through 'z'.
Returns a byte string equal to this byte string, but with the bytes 'a'
through 'z' replaced with the corresponding byte in 'A' through 'Z'.
int
final boolean
Returns the 160-bit SHA-1 HMAC of this buffer.
Returns the 160-bit SHA-1 HMAC of this byte string.
Returns a sink that uses the obsolete SHA-1 HMAC algorithm to produce 160-bit hashes.
Returns a sink that uses the obsolete SHA-1 HMAC algorithm to produce 160-bit hashes.
Returns the 256-bit SHA-256 HMAC of this buffer.
Returns the 256-bit SHA-256 HMAC of this byte string.
Returns a sink that uses the SHA-256 HMAC algorithm to produce 256-bit hashes.
Returns a sink that uses the SHA-256 HMAC algorithm to produce 256-bit hashes.
Returns the 512-bit SHA-512 HMAC of this buffer.
Returns the 512-bit SHA-512 HMAC of this byte string.
Returns a sink that uses the SHA-512 HMAC algorithm to produce 512-bit hashes.
long
long
long
long
Returns the index of the first match for bytes in the buffer at or after
fromIndex.
final int
final int
long
long
long
long
Returns the first index in this buffer that is at or after fromIndex and that contains
any of the bytes in targetBytes.
final int
final int
boolean
boolean
boolean
Returns true if the bytes at offset in this source equal bytes.
boolean
Returns true if byteCount bytes at offset in this source equal bytes
at bytesOffset.
boolean
Returns true if the bytes of this in [offset..offset+byteCount) equal the bytes of
other in [otherOffset..otherOffset+byteCount).
final boolean