Uses of Class
okio.ByteString
-
-
Uses of ByteString in okio
Fields in okio declared as ByteString Modifier and Type Field Description static ByteStringByteString. EMPTYA singleton emptyByteString.Methods in okio that return ByteString Modifier and Type Method Description static ByteStringByteString. decodeBase64(String base64)Decodes the Base64-encoded bytes and returns their value as a byte string.static ByteStringByteString. decodeHex(String hex)Decodes 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.ByteStringOptions. get(int i)ByteStringHashingSink. hash()Returns the hash of the bytes accepted thus far and resets the internal state of this sink.ByteStringHashingSource. hash()Returns the hash of the bytes supplied thus far and resets the internal state of this source.ByteStringBuffer. hmacSha1(ByteString key)Returns the 160-bit SHA-1 HMAC of this buffer.ByteStringByteString. hmacSha1(ByteString key)Returns the 160-bit SHA-1 HMAC of this byte string.ByteStringBuffer. hmacSha256(ByteString key)Returns the 256-bit SHA-256 HMAC of this buffer.ByteStringByteString. hmacSha256(ByteString key)Returns the 256-bit SHA-256 HMAC of this byte string.ByteStringBuffer. hmacSha512(ByteString key)Returns the 512-bit SHA-512 HMAC of this buffer.ByteStringByteString. hmacSha512(ByteString key)Returns the 512-bit SHA-512 HMAC of this byte string.ByteStringBuffer. md5()Returns the 128-bit MD5 hash of this buffer.ByteStringByteString. 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.ByteStringBuffer. readByteString()ByteStringBuffer. readByteString(long byteCount)ByteStringBufferedSource. readByteString()Removes all bytes bytes from this and returns them as a byte string.ByteStringBufferedSource. readByteString(long byteCount)RemovesbyteCountbytes from this and returns them as a byte string.ByteStringBuffer. sha1()Returns the 160-bit SHA-1 hash of this buffer.ByteStringByteString. sha1()Returns the 160-bit SHA-1 hash of this byte string.ByteStringBuffer. sha256()Returns the 256-bit SHA-256 hash of this buffer.ByteStringByteString. sha256()Returns the 256-bit SHA-256 hash of this byte string.ByteStringBuffer. sha512()Returns the 512-bit SHA-512 hash of this buffer.ByteStringByteString. sha512()Returns the 512-bit SHA-512 hash of this byte string.ByteStringBuffer. snapshot()Returns an immutable copy of this buffer as a byte string.ByteStringBuffer. snapshot(int byteCount)Returns an immutable copy of the firstbyteCountbytes of this buffer as a byte string.ByteStringByteString. 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.ByteStringByteString. 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.ByteStringByteString. 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'.ByteStringByteString. 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 intByteString. compareTo(ByteString byteString)booleanByteString. endsWith(ByteString suffix)ByteStringBuffer. hmacSha1(ByteString key)Returns the 160-bit SHA-1 HMAC of this buffer.ByteStringByteString. 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.ByteStringBuffer. hmacSha256(ByteString key)Returns the 256-bit SHA-256 HMAC of this buffer.ByteStringByteString. 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.ByteStringBuffer. hmacSha512(ByteString key)Returns the 512-bit SHA-512 HMAC of this buffer.ByteStringByteString. 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.intByteString. indexOf(ByteString other)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.intByteString. lastIndexOf(ByteString other)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).booleanByteString. startsWith(ByteString prefix)BufferBuffer. write(ByteString byteString)BufferedSinkBufferedSink. write(ByteString byteString)
-