Uses of Class
okio.ByteString
-
-
Uses of ByteString in okio
Fields in okio declared as ByteString Modifier and Type Field Description static ByteString
ByteString. EMPTY
A singleton emptyByteString
.Methods in okio that return ByteString Modifier and Type Method Description static ByteString
ByteString. decodeBase64(String base64)
Decodes the Base64-encoded bytes and returns their value as a byte string.static ByteString
ByteString. decodeHex(String hex)
Decodes the hex-encoded bytes and returns their value a byte string.static ByteString
ByteString. encodeString(String s, Charset charset)
Returns a new byte string containing thecharset
-encoded bytes ofs
.static ByteString
ByteString. encodeUtf8(String s)
Returns a new byte string containing theUTF-8
bytes ofs
.ByteString
Options. get(int i)
ByteString
HashingSink. hash()
Returns the hash of the bytes accepted thus far and resets the internal state of this sink.ByteString
HashingSource. hash()
Returns the hash of the bytes supplied thus far and resets the internal state of this source.ByteString
Buffer. hmacSha1(ByteString key)
Returns the 160-bit SHA-1 HMAC of this buffer.ByteString
ByteString. hmacSha1(ByteString key)
Returns the 160-bit SHA-1 HMAC of this byte string.ByteString
Buffer. hmacSha256(ByteString key)
Returns the 256-bit SHA-256 HMAC of this buffer.ByteString
ByteString. hmacSha256(ByteString key)
Returns the 256-bit SHA-256 HMAC of this byte string.ByteString
Buffer. hmacSha512(ByteString key)
Returns the 512-bit SHA-512 HMAC of this buffer.ByteString
ByteString. hmacSha512(ByteString key)
Returns the 512-bit SHA-512 HMAC of this byte string.ByteString
Buffer. md5()
Returns the 128-bit MD5 hash of this buffer.ByteString
ByteString. md5()
Returns the 128-bit MD5 hash of this byte string.static ByteString
ByteString. of(byte... data)
Returns a new byte string containing a clone of the bytes ofdata
.static ByteString
ByteString. of(byte[] data, int offset, int byteCount)
Returns a new byte string containing a copy ofbyteCount
bytes ofdata
starting atoffset
.static ByteString
ByteString. of(ByteBuffer data)
static ByteString
ByteString. read(InputStream in, int byteCount)
Readscount
bytes fromin
and returns the result.ByteString
Buffer. readByteString()
ByteString
Buffer. readByteString(long byteCount)
ByteString
BufferedSource. readByteString()
Removes all bytes bytes from this and returns them as a byte string.ByteString
BufferedSource. readByteString(long byteCount)
RemovesbyteCount
bytes from this and returns them as a byte string.ByteString
Buffer. sha1()
Returns the 160-bit SHA-1 hash of this buffer.ByteString
ByteString. sha1()
Returns the 160-bit SHA-1 hash of this byte string.ByteString
Buffer. sha256()
Returns the 256-bit SHA-256 hash of this buffer.ByteString
ByteString. sha256()
Returns the 256-bit SHA-256 hash of this byte string.ByteString
Buffer. sha512()
Returns the 512-bit SHA-512 hash of this buffer.ByteString
ByteString. sha512()
Returns the 512-bit SHA-512 hash of this byte string.ByteString
Buffer. snapshot()
Returns an immutable copy of this buffer as a byte string.ByteString
Buffer. snapshot(int byteCount)
Returns an immutable copy of the firstbyteCount
bytes of this buffer as a byte string.ByteString
ByteString. substring(int beginIndex)
Returns a byte string that is a substring of this byte string, beginning at the specified index until the end of this string.ByteString
ByteString. substring(int beginIndex, int endIndex)
Returns a byte string that is a substring of this byte string, beginning at the specifiedbeginIndex
and ends at the specifiedendIndex
.ByteString
ByteString. toAsciiLowercase()
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'.ByteString
ByteString. toAsciiUppercase()
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'.Methods in okio with parameters of type ByteString Modifier and Type Method Description int
ByteString. compareTo(ByteString byteString)
boolean
ByteString. endsWith(ByteString suffix)
ByteString
Buffer. hmacSha1(ByteString key)
Returns the 160-bit SHA-1 HMAC of this buffer.ByteString
ByteString. hmacSha1(ByteString key)
Returns the 160-bit SHA-1 HMAC of this byte string.static HashingSink
HashingSink. hmacSha1(Sink sink, ByteString key)
Returns a sink that uses the obsolete SHA-1 HMAC algorithm to produce 160-bit hashes.static HashingSource
HashingSource. hmacSha1(Source source, ByteString key)
Returns a sink that uses the obsolete SHA-1 HMAC algorithm to produce 160-bit hashes.ByteString
Buffer. hmacSha256(ByteString key)
Returns the 256-bit SHA-256 HMAC of this buffer.ByteString
ByteString. hmacSha256(ByteString key)
Returns the 256-bit SHA-256 HMAC of this byte string.static HashingSink
HashingSink. hmacSha256(Sink sink, ByteString key)
Returns a sink that uses the SHA-256 HMAC algorithm to produce 256-bit hashes.static HashingSource
HashingSource. hmacSha256(Source source, ByteString key)
Returns a sink that uses the SHA-256 HMAC algorithm to produce 256-bit hashes.ByteString
Buffer. hmacSha512(ByteString key)
Returns the 512-bit SHA-512 HMAC of this buffer.ByteString
ByteString. hmacSha512(ByteString key)
Returns the 512-bit SHA-512 HMAC of this byte string.static HashingSink
HashingSink. hmacSha512(Sink sink, ByteString key)
Returns a sink that uses the SHA-512 HMAC algorithm to produce 512-bit hashes.long
Buffer. indexOf(ByteString bytes)
long
Buffer. indexOf(ByteString bytes, long fromIndex)
long
BufferedSource. indexOf(ByteString bytes)
Equivalent toindexOf(bytes, 0)
.long
BufferedSource. indexOf(ByteString bytes, long fromIndex)
Returns the index of the first match forbytes
in the buffer at or afterfromIndex
.int
ByteString. indexOf(ByteString other)
int
ByteString. indexOf(ByteString other, int fromIndex)
long
Buffer. indexOfElement(ByteString targetBytes)
long
Buffer. indexOfElement(ByteString targetBytes, long fromIndex)
long
BufferedSource. indexOfElement(ByteString targetBytes)
Equivalent toindexOfElement(targetBytes, 0)
.long
BufferedSource. indexOfElement(ByteString targetBytes, long fromIndex)
Returns the first index in this buffer that is at or afterfromIndex
and that contains any of the bytes intargetBytes
.int
ByteString. lastIndexOf(ByteString other)
int
ByteString. lastIndexOf(ByteString other, int fromIndex)
static Options
Options. of(ByteString... byteStrings)
boolean
Buffer. rangeEquals(long offset, ByteString bytes)
boolean
Buffer. rangeEquals(long offset, ByteString bytes, int bytesOffset, int byteCount)
boolean
BufferedSource. rangeEquals(long offset, ByteString bytes)
Returns true if the bytes atoffset
in this source equalbytes
.boolean
BufferedSource. rangeEquals(long offset, ByteString bytes, int bytesOffset, int byteCount)
Returns true ifbyteCount
bytes atoffset
in this source equalbytes
atbytesOffset
.boolean
ByteString. rangeEquals(int offset, ByteString other, int otherOffset, int byteCount)
Returns true if the bytes of this in[offset..offset+byteCount)
equal the bytes ofother
in[otherOffset..otherOffset+byteCount)
.boolean
ByteString. startsWith(ByteString prefix)
Buffer
Buffer. write(ByteString byteString)
BufferedSink
BufferedSink. write(ByteString byteString)
-