- hasDeadline() - Method in class okio.ForwardingTimeout
-
- hasDeadline() - Method in class okio.Timeout
-
Returns true if a deadline is enabled.
- hash() - Method in class okio.HashingSink
-
Returns the hash of the bytes accepted thus far and resets the internal state of this sink.
- hash() - Method in class okio.HashingSource
-
Returns the hash of the bytes supplied thus far and resets the internal state of this source.
- hashCode() - Method in class okio.Buffer
-
- hashCode() - Method in class okio.ByteString
-
- HashingSink - Class in okio
-
A sink that computes a hash of the full stream of bytes it has accepted.
- HashingSource - Class in okio
-
A source that computes a hash of the full stream of bytes it has supplied.
- hex() - Method in class okio.ByteString
-
Returns this byte string encoded in hexadecimal.
- hmacSha1(ByteString) - Method in class okio.Buffer
-
Returns the 160-bit SHA-1 HMAC of this buffer.
- hmacSha1(ByteString) - Method in class okio.ByteString
-
Returns the 160-bit SHA-1 HMAC of this byte string.
- hmacSha1(Sink, ByteString) - Static method in class okio.HashingSink
-
Returns a sink that uses the obsolete SHA-1 HMAC algorithm to produce 160-bit hashes.
- hmacSha1(Source, ByteString) - Static method in class okio.HashingSource
-
Returns a sink that uses the obsolete SHA-1 HMAC algorithm to produce 160-bit hashes.
- hmacSha256(ByteString) - Method in class okio.Buffer
-
Returns the 256-bit SHA-256 HMAC of this buffer.
- hmacSha256(ByteString) - Method in class okio.ByteString
-
Returns the 256-bit SHA-256 HMAC of this byte string.
- hmacSha256(Sink, ByteString) - Static method in class okio.HashingSink
-
Returns a sink that uses the SHA-256 HMAC algorithm to produce 256-bit hashes.
- hmacSha256(Source, ByteString) - Static method in class okio.HashingSource
-
Returns a sink that uses the SHA-256 HMAC algorithm to produce 256-bit hashes.
- hmacSha512(ByteString) - Method in class okio.Buffer
-
Returns the 512-bit SHA-512 HMAC of this buffer.
- hmacSha512(ByteString) - Method in class okio.ByteString
-
Returns the 512-bit SHA-512 HMAC of this byte string.
- hmacSha512(Sink, ByteString) - Static method in class okio.HashingSink
-
Returns a sink that uses the SHA-512 HMAC algorithm to produce 512-bit hashes.
- rangeEquals(long, ByteString) - Method in class okio.Buffer
-
- rangeEquals(long, ByteString, int, int) - Method in class okio.Buffer
-
- rangeEquals(long, ByteString) - Method in interface okio.BufferedSource
-
Returns true if the bytes at offset
in this source equal bytes
.
- rangeEquals(long, ByteString, int, int) - Method in interface okio.BufferedSource
-
Returns true if byteCount
bytes at offset
in this source equal bytes
at bytesOffset
.
- rangeEquals(int, ByteString, int, int) - Method in class okio.ByteString
-
Returns true if the bytes of this in [offset..offset+byteCount)
equal the bytes of
other
in [otherOffset..otherOffset+byteCount)
.
- rangeEquals(int, byte[], int, int) - Method in class okio.ByteString
-
Returns true if the bytes of this in [offset..offset+byteCount)
equal the bytes of
other
in [otherOffset..otherOffset+byteCount)
.
- read(byte[]) - Method in class okio.Buffer
-
- read(byte[], int, int) - Method in class okio.Buffer
-
- read(ByteBuffer) - Method in class okio.Buffer
-
- read(Buffer, long) - Method in class okio.Buffer
-
- read(byte[]) - Method in interface okio.BufferedSource
-
Removes up to sink.length
bytes from this and copies them into sink
.
- read(byte[], int, int) - Method in interface okio.BufferedSource
-
Removes up to byteCount
bytes from this and copies them into sink
at offset
.
- read(InputStream, int) - Static method in class okio.ByteString
-
Reads count
bytes from in
and returns the result.
- read(Buffer, long) - Method in class okio.ForwardingSource
-
- read(Buffer, long) - Method in class okio.GzipSource
-
- read(Buffer, long) - Method in class okio.HashingSource
-
- read(Buffer, long) - Method in class okio.InflaterSource
-
- read(Buffer, long) - Method in interface okio.Source
-
Removes at least 1, and up to byteCount
bytes from this and appends
them to sink
.
- readAll(Sink) - Method in class okio.Buffer
-
- readAll(Sink) - Method in interface okio.BufferedSource
-
Removes all bytes from this and appends them to sink
.
- readAndWriteUnsafe() - Method in class okio.Buffer
-
- readAndWriteUnsafe(Buffer.UnsafeCursor) - Method in class okio.Buffer
-
- readByte() - Method in class okio.Buffer
-
- readByte() - Method in interface okio.BufferedSource
-
Removes a byte from this source and returns it.
- readByteArray() - Method in class okio.Buffer
-
- readByteArray(long) - Method in class okio.Buffer
-
- readByteArray() - Method in interface okio.BufferedSource
-
Removes all bytes from this and returns them as a byte array.
- readByteArray(long) - Method in interface okio.BufferedSource
-
Removes byteCount
bytes from this and returns them as a byte array.
- readByteString() - Method in class okio.Buffer
-
- readByteString(long) - Method in class okio.Buffer
-
- readByteString() - Method in interface okio.BufferedSource
-
Removes all bytes bytes from this and returns them as a byte string.
- readByteString(long) - Method in interface okio.BufferedSource
-
Removes byteCount
bytes from this and returns them as a byte string.
- readDecimalLong() - Method in class okio.Buffer
-
- readDecimalLong() - Method in interface okio.BufferedSource
-
Reads a long from this source in signed decimal form (i.e., as a string in base 10 with
optional leading '-').
- readFrom(InputStream) - Method in class okio.Buffer
-
Read and exhaust bytes from in
to this.
- readFrom(InputStream, long) - Method in class okio.Buffer
-
Read byteCount
bytes from in
to this.
- readFully(Buffer, long) - Method in class okio.Buffer
-
- readFully(byte[]) - Method in class okio.Buffer
-
- readFully(byte[]) - Method in interface okio.BufferedSource
-
Removes exactly sink.length
bytes from this and copies them into sink
.
- readFully(Buffer, long) - Method in interface okio.BufferedSource
-
Removes exactly byteCount
bytes from this and appends them to sink
.
- readHexadecimalUnsignedLong() - Method in class okio.Buffer
-
- readHexadecimalUnsignedLong() - Method in interface okio.BufferedSource
-
Reads a long form this source in hexadecimal form (i.e., as a string in base 16).
- readInt() - Method in class okio.Buffer
-
- readInt() - Method in interface okio.BufferedSource
-
Removes four bytes from this source and returns a big-endian int.
- readIntLe() - Method in class okio.Buffer
-
- readIntLe() - Method in interface okio.BufferedSource
-
Removes four bytes from this source and returns a little-endian int.
- readLong() - Method in class okio.Buffer
-
- readLong() - Method in interface okio.BufferedSource
-
Removes eight bytes from this source and returns a big-endian long.
- readLongLe() - Method in class okio.Buffer
-
- readLongLe() - Method in interface okio.BufferedSource
-
Removes eight bytes from this source and returns a little-endian long.
- readShort() - Method in class okio.Buffer
-
- readShort() - Method in interface okio.BufferedSource
-
Removes two bytes from this source and returns a big-endian short.
- readShortLe() - Method in class okio.Buffer
-
- readShortLe() - Method in interface okio.BufferedSource
-
Removes two bytes from this source and returns a little-endian short.
- readString(Charset) - Method in class okio.Buffer
-
- readString(long, Charset) - Method in class okio.Buffer
-
- readString(Charset) - Method in interface okio.BufferedSource
-
Removes all bytes from this, decodes them as charset
, and returns the string.
- readString(long, Charset) - Method in interface okio.BufferedSource
-
Removes byteCount
bytes from this, decodes them as charset
, and returns the
string.
- readUnsafe() - Method in class okio.Buffer
-
- readUnsafe(Buffer.UnsafeCursor) - Method in class okio.Buffer
-
- readUtf8() - Method in class okio.Buffer
-
- readUtf8(long) - Method in class okio.Buffer
-
- readUtf8() - Method in interface okio.BufferedSource
-
Removes all bytes from this, decodes them as UTF-8, and returns the string.
- readUtf8(long) - Method in interface okio.BufferedSource
-
Removes byteCount
bytes from this, decodes them as UTF-8, and returns the string.
- readUtf8CodePoint() - Method in class okio.Buffer
-
- readUtf8CodePoint() - Method in interface okio.BufferedSource
-
Removes and returns a single UTF-8 code point, reading between 1 and 4 bytes as necessary.
- readUtf8Line() - Method in class okio.Buffer
-
- readUtf8Line() - Method in interface okio.BufferedSource
-
Removes and returns characters up to but not including the next line break.
- readUtf8LineStrict() - Method in class okio.Buffer
-
- readUtf8LineStrict(long) - Method in class okio.Buffer
-
- readUtf8LineStrict() - Method in interface okio.BufferedSource
-
Removes and returns characters up to but not including the next line break.
- readUtf8LineStrict(long) - Method in interface okio.BufferedSource
-
- readWrite - Variable in class okio.Buffer.UnsafeCursor
-
- refill() - Method in class okio.InflaterSource
-
Refills the inflater with compressed data if it needs input.
- request(long) - Method in class okio.Buffer
-
- request(long) - Method in interface okio.BufferedSource
-
Returns true when the buffer contains at least byteCount
bytes, expanding it as
necessary.
- require(long) - Method in class okio.Buffer
-
- require(long) - Method in interface okio.BufferedSource
-
Returns when the buffer contains at least byteCount
bytes.
- resizeBuffer(long) - Method in class okio.Buffer.UnsafeCursor
-
Change the size of the buffer so that it equals newSize
by either adding new
capacity at the end or truncating the buffer at the end.
- seek(long) - Method in class okio.Buffer.UnsafeCursor
-
Reposition the cursor so that the data at offset
is readable at data[start]
.
- select(Options) - Method in class okio.Buffer
-
- select(Options) - Method in interface okio.BufferedSource
-
Finds the first string in options
that is a prefix of this buffer, consumes it from
this buffer, and returns its index.
- setDelegate(Timeout) - Method in class okio.ForwardingTimeout
-
- sha1() - Method in class okio.Buffer
-
Returns the 160-bit SHA-1 hash of this buffer.
- sha1() - Method in class okio.ByteString
-
Returns the 160-bit SHA-1 hash of this byte string.
- sha1(Sink) - Static method in class okio.HashingSink
-
Returns a sink that uses the obsolete SHA-1 hash algorithm to produce 160-bit hashes.
- sha1(Source) - Static method in class okio.HashingSource
-
Returns a sink that uses the obsolete SHA-1 hash algorithm to produce 160-bit hashes.
- sha256() - Method in class okio.Buffer
-
Returns the 256-bit SHA-256 hash of this buffer.
- sha256() - Method in class okio.ByteString
-
Returns the 256-bit SHA-256 hash of this byte string.
- sha256(Sink) - Static method in class okio.HashingSink
-
Returns a sink that uses the SHA-256 hash algorithm to produce 256-bit hashes.
- sha256(Source) - Static method in class okio.HashingSource
-
Returns a sink that uses the SHA-256 hash algorithm to produce 256-bit hashes.
- sha512() - Method in class okio.Buffer
-
Returns the 512-bit SHA-512 hash of this buffer.
- sha512() - Method in class okio.ByteString
-
Returns the 512-bit SHA-512 hash of this byte string.
- sha512(Sink) - Static method in class okio.HashingSink
-
Returns a sink that uses the SHA-512 hash algorithm to produce 512-bit hashes.
- sink(Sink) - Method in class okio.AsyncTimeout
-
Returns a new sink that delegates to sink
, using this to implement timeouts.
- sink(OutputStream) - Static method in class okio.Okio
-
Returns a sink that writes to out
.
- sink(Socket) - Static method in class okio.Okio
-
Returns a sink that writes to socket
.
- sink(File) - Static method in class okio.Okio
-
Returns a sink that writes to file
.
- sink(Path, OpenOption...) - Static method in class okio.Okio
-
Returns a sink that writes to path
.
- sink() - Method in class okio.Pipe
-
- Sink - Interface in okio
-
Receives a stream of bytes.
- size() - Method in class okio.Buffer
-
Returns the number of bytes currently in this buffer.
- size() - Method in class okio.ByteString
-
Returns the number of bytes in this ByteString.
- size() - Method in class okio.Options
-
- size(String) - Static method in class okio.Utf8
-
- size(String, int, int) - Static method in class okio.Utf8
-
- skip(long) - Method in class okio.Buffer
-
Discards byteCount
bytes from the head of this buffer.
- skip(long) - Method in interface okio.BufferedSource
-
Reads and discards byteCount
bytes from this source.
- snapshot() - Method in class okio.Buffer
-
Returns an immutable copy of this buffer as a byte string.
- snapshot(int) - Method in class okio.Buffer
-
Returns an immutable copy of the first byteCount
bytes of this buffer as a byte string.
- source(Source) - Method in class okio.AsyncTimeout
-
Returns a new source that delegates to source
, using this to implement timeouts.
- source(InputStream) - Static method in class okio.Okio
-
Returns a source that reads from in
.
- source(File) - Static method in class okio.Okio
-
Returns a source that reads from file
.
- source(Path, OpenOption...) - Static method in class okio.Okio
-
Returns a source that reads from path
.
- source(Socket) - Static method in class okio.Okio
-
Returns a source that reads from socket
.
- source() - Method in class okio.Pipe
-
- Source - Interface in okio
-
Supplies a stream of bytes.
- start - Variable in class okio.Buffer.UnsafeCursor
-
- startsWith(ByteString) - Method in class okio.ByteString
-
- startsWith(byte[]) - Method in class okio.ByteString
-
- string(Charset) - Method in class okio.ByteString
-
Constructs a new String
by decoding the bytes using charset
.
- substring(int) - Method in class okio.ByteString
-
Returns a byte string that is a substring of this byte string, beginning at the specified
index until the end of this string.
- substring(int, int) - Method in class okio.ByteString
-
Returns a byte string that is a substring of this byte string, beginning at the specified
beginIndex
and ends at the specified endIndex
.
- waitUntilNotified(Object) - Method in class okio.Timeout
-
Waits on monitor
until it is notified.
- write(ByteString) - Method in class okio.Buffer
-
- write(byte[]) - Method in class okio.Buffer
-
- write(byte[], int, int) - Method in class okio.Buffer
-
- write(ByteBuffer) - Method in class okio.Buffer
-
- write(Source, long) - Method in class okio.Buffer
-
- write(Buffer, long) - Method in class okio.Buffer
-
- write(ByteString) - Method in interface okio.BufferedSink
-
- write(byte[]) - Method in interface okio.BufferedSink
-
Like OutputStream.write(byte[])
, this writes a complete byte array to
this sink.
- write(byte[], int, int) - Method in interface okio.BufferedSink
-
Like OutputStream.write(byte[], int, int)
, this writes byteCount
bytes of source
, starting at offset
.
- write(Source, long) - Method in interface okio.BufferedSink
-
Removes byteCount
bytes from source
and appends them to this sink.
- write(OutputStream) - Method in class okio.ByteString
-
Writes the contents of this byte string to out
.
- write(Buffer, long) - Method in class okio.DeflaterSink
-
- write(Buffer, long) - Method in class okio.ForwardingSink
-
- write(Buffer, long) - Method in class okio.GzipSink
-
- write(Buffer, long) - Method in class okio.HashingSink
-
- write(Buffer, long) - Method in interface okio.Sink
-
Removes byteCount
bytes from source
and appends them to this.
- writeAll(Source) - Method in class okio.Buffer
-
- writeAll(Source) - Method in interface okio.BufferedSink
-
Removes all bytes from source
and appends them to this sink.
- writeByte(int) - Method in class okio.Buffer
-
- writeByte(int) - Method in interface okio.BufferedSink
-
Writes a byte to this sink.
- writeDecimalLong(long) - Method in class okio.Buffer
-
- writeDecimalLong(long) - Method in interface okio.BufferedSink
-
Writes a long to this sink in signed decimal form (i.e., as a string in base 10).
- writeHexadecimalUnsignedLong(long) - Method in class okio.Buffer
-
- writeHexadecimalUnsignedLong(long) - Method in interface okio.BufferedSink
-
Writes a long to this sink in hexadecimal form (i.e., as a string in base 16).
- writeInt(int) - Method in class okio.Buffer
-
- writeInt(int) - Method in interface okio.BufferedSink
-
Writes a big-endian int to this sink using four bytes.
- writeIntLe(int) - Method in class okio.Buffer
-
- writeIntLe(int) - Method in interface okio.BufferedSink
-
Writes a little-endian int to this sink using four bytes.
- writeLong(long) - Method in class okio.Buffer
-
- writeLong(long) - Method in interface okio.BufferedSink
-
Writes a big-endian long to this sink using eight bytes.
- writeLongLe(long) - Method in class okio.Buffer
-
- writeLongLe(long) - Method in interface okio.BufferedSink
-
Writes a little-endian long to this sink using eight bytes.
- writeShort(int) - Method in class okio.Buffer
-
- writeShort(int) - Method in interface okio.BufferedSink
-
Writes a big-endian short to this sink using two bytes.
- writeShortLe(int) - Method in class okio.Buffer
-
- writeShortLe(int) - Method in interface okio.BufferedSink
-
Writes a little-endian short to this sink using two bytes.
- writeString(String, Charset) - Method in class okio.Buffer
-
- writeString(String, int, int, Charset) - Method in class okio.Buffer
-
- writeString(String, Charset) - Method in interface okio.BufferedSink
-
Encodes string
in charset
and writes it to this sink.
- writeString(String, int, int, Charset) - Method in interface okio.BufferedSink
-
Encodes the characters at beginIndex
up to endIndex
from string
in
charset
and writes it to this sink.
- writeTo(OutputStream) - Method in class okio.Buffer
-
Write the contents of this to out
.
- writeTo(OutputStream, long) - Method in class okio.Buffer
-
Write byteCount
bytes from this to out
.
- writeUtf8(String) - Method in class okio.Buffer
-
- writeUtf8(String, int, int) - Method in class okio.Buffer
-
- writeUtf8(String) - Method in interface okio.BufferedSink
-
Encodes string
in UTF-8 and writes it to this sink.
- writeUtf8(String, int, int) - Method in interface okio.BufferedSink
-
Encodes the characters at beginIndex
up to endIndex
from string
in
UTF-8 and writes it to this sink.
- writeUtf8CodePoint(int) - Method in class okio.Buffer
-
- writeUtf8CodePoint(int) - Method in interface okio.BufferedSink
-
Encodes codePoint
in UTF-8 and writes it to this sink.