Uses of Class
okio.ByteString
-
Uses of ByteString in okio
Subclasses with type arguments of type ByteString in okioModifier and TypeClassDescriptionfinal classAn indexed set of values that may be read withBufferedSource.select(Options).Classes in okio that implement interfaces with type arguments of type ByteStringFields in okio declared as ByteStringModifier and TypeFieldDescriptionstatic final ByteStringByteString.EMPTYA singleton emptyByteString.Methods in okio that return ByteStringModifier and TypeMethodDescriptionstatic ByteStringByteString.decodeBase64(String base64) Decodes the Base64-encoded bytes and returns their value as a byte string.static ByteStringDecodes the hex-encoded bytes and returns their value a byte string.static ByteStringByteString.encodeString(String s, Charset charset) Returns a new byte string containing thecharset-encoded bytes ofs.static ByteStringByteString.encodeUtf8(String s) Returns a new byte string containing theUTF-8bytes ofs.Options.get(int i) final ByteStringHashingSink.hash()Returns the hash of the bytes accepted thus far and resets the internal state of this sink.final ByteStringHashingSource.hash()Returns the hash of the bytes supplied thus far and resets the internal state of this source.final ByteStringBuffer.hmacSha1(ByteString key) Returns the 160-bit SHA-1 HMAC of this buffer.ByteString.hmacSha1(ByteString key) Returns the 160-bit SHA-1 HMAC of this byte string.final ByteStringBuffer.hmacSha256(ByteString key) Returns the 256-bit SHA-256 HMAC of this buffer.ByteString.hmacSha256(ByteString key) Returns the 256-bit SHA-256 HMAC of this byte string.final ByteStringBuffer.hmacSha512(ByteString key) Returns the 512-bit SHA-512 HMAC of this buffer.ByteString.hmacSha512(ByteString key) Returns the 512-bit SHA-512 HMAC of this byte string.final ByteStringBuffer.md5()Returns the 128-bit MD5 hash of this buffer.ByteString.md5()Returns the 128-bit MD5 hash of this byte string.static ByteStringByteString.of(byte... data) Returns a new byte string containing a clone of the bytes ofdata.static ByteStringByteString.of(byte[] data, int offset, int byteCount) Returns a new byte string containing a copy ofbyteCountbytes ofdatastarting atoffset.static ByteStringByteString.of(ByteBuffer data) static ByteStringByteString.read(InputStream in, int byteCount) Readscountbytes frominand returns the result.Buffer.readByteString()Buffer.readByteString(long byteCount) BufferedSource.readByteString()Removes all bytes bytes from this and returns them as a byte string.BufferedSource.readByteString(long byteCount) RemovesbyteCountbytes from this and returns them as a byte string.final ByteStringBuffer.sha1()Returns the 160-bit SHA-1 hash of this buffer.ByteString.sha1()Returns the 160-bit SHA-1 hash of this byte string.final ByteStringBuffer.sha256()Returns the 256-bit SHA-256 hash of this buffer.ByteString.sha256()Returns the 256-bit SHA-256 hash of this byte string.final ByteStringBuffer.sha512()Returns the 512-bit SHA-512 hash of this buffer.ByteString.sha512()Returns the 512-bit SHA-512 hash of this byte string.final ByteStringBuffer.snapshot()Returns an immutable copy of this buffer as a byte string.final ByteStringBuffer.snapshot(int byteCount) Returns an immutable copy of the firstbyteCountbytes of this buffer as a byte string.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.substring(int beginIndex, int endIndex) Returns a byte string that is a substring of this byte string, beginning at the specifiedbeginIndexand ends at the specifiedendIndex.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.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 ByteStringModifier and TypeMethodDescriptionintByteString.compareTo(ByteString byteString) final booleanByteString.endsWith(ByteString suffix) final ByteStringBuffer.hmacSha1(ByteString key) Returns the 160-bit SHA-1 HMAC of this buffer.ByteString.hmacSha1(ByteString key) Returns the 160-bit SHA-1 HMAC of this byte string.static HashingSinkHashingSink.hmacSha1(Sink sink, ByteString key) Returns a sink that uses the obsolete SHA-1 HMAC algorithm to produce 160-bit hashes.static HashingSourceHashingSource.hmacSha1(Source source, ByteString key) Returns a sink that uses the obsolete SHA-1 HMAC algorithm to produce 160-bit hashes.final ByteStringBuffer.hmacSha256(ByteString key) Returns the 256-bit SHA-256 HMAC of this buffer.ByteString.hmacSha256(ByteString key) Returns the 256-bit SHA-256 HMAC of this byte string.static HashingSinkHashingSink.hmacSha256(Sink sink, ByteString key) Returns a sink that uses the SHA-256 HMAC algorithm to produce 256-bit hashes.static HashingSourceHashingSource.hmacSha256(Source source, ByteString key) Returns a sink that uses the SHA-256 HMAC algorithm to produce 256-bit hashes.final ByteStringBuffer.hmacSha512(ByteString key) Returns the 512-bit SHA-512 HMAC of this buffer.ByteString.hmacSha512(ByteString key) Returns the 512-bit SHA-512 HMAC of this byte string.static HashingSinkHashingSink.hmacSha512(Sink sink, ByteString key) Returns a sink that uses the SHA-512 HMAC algorithm to produce 512-bit hashes.longBuffer.indexOf(ByteString bytes) longBuffer.indexOf(ByteString bytes, long fromIndex) longBufferedSource.indexOf(ByteString bytes) Equivalent toindexOf(bytes, 0).longBufferedSource.indexOf(ByteString bytes, long fromIndex) Returns the index of the first match forbytesin the buffer at or afterfromIndex.final intByteString.indexOf(ByteString other) final intByteString.indexOf(ByteString other, int fromIndex) longBuffer.indexOfElement(ByteString targetBytes) longBuffer.indexOfElement(ByteString targetBytes, long fromIndex) longBufferedSource.indexOfElement(ByteString targetBytes) Equivalent toindexOfElement(targetBytes, 0).longBufferedSource.indexOfElement(ByteString targetBytes, long fromIndex) Returns the first index in this buffer that is at or afterfromIndexand that contains any of the bytes intargetBytes.final intByteString.lastIndexOf(ByteString other) final intByteString.lastIndexOf(ByteString other, int fromIndex) static OptionsOptions.of(ByteString... byteStrings) booleanBuffer.rangeEquals(long offset, ByteString bytes) booleanBuffer.rangeEquals(long offset, ByteString bytes, int bytesOffset, int byteCount) booleanBufferedSource.rangeEquals(long offset, ByteString bytes) Returns true if the bytes atoffsetin this source equalbytes.booleanBufferedSource.rangeEquals(long offset, ByteString bytes, int bytesOffset, int byteCount) Returns true ifbyteCountbytes atoffsetin this source equalbytesatbytesOffset.booleanByteString.rangeEquals(int offset, ByteString other, int otherOffset, int byteCount) Returns true if the bytes of this in[offset..offset+byteCount)equal the bytes ofotherin[otherOffset..otherOffset+byteCount).final booleanByteString.startsWith(ByteString prefix) Buffer.write(ByteString byteString) BufferedSink.write(ByteString byteString)