Index
All Classes and Interfaces|All Packages|Serialized Form
A
- appendingSink(File) - Static method in class okio.Okio
-
Returns a sink that appends to
file
. - asByteBuffer() - Method in class okio.ByteString
-
Returns a
ByteBuffer
view of the bytes in thisByteString
. - AsyncTimeout - Class in okio
-
This timeout uses a background thread to take action exactly when the timeout occurs.
- AsyncTimeout() - Constructor for class okio.AsyncTimeout
B
- base64() - Method in class okio.ByteString
-
Returns this byte string encoded as Base64.
- base64Url() - Method in class okio.ByteString
-
Returns this byte string encoded as URL-safe Base64.
- blackhole() - Static method in class okio.Okio
-
Returns a sink that writes nowhere.
- buffer - Variable in class okio.Buffer.UnsafeCursor
- buffer() - Method in class okio.Buffer
- buffer() - Method in interface okio.BufferedSink
-
Returns this sink's internal buffer.
- buffer() - Method in interface okio.BufferedSource
-
Deprecated.use getBuffer() instead.
- buffer(Sink) - Static method in class okio.Okio
-
Returns a new sink that buffers writes to
sink
. - buffer(Source) - Static method in class okio.Okio
-
Returns a new source that buffers reads from
source
. - Buffer - Class in okio
-
A collection of bytes in memory.
- Buffer() - Constructor for class okio.Buffer
- Buffer.UnsafeCursor - Class in okio
-
A handle to the underlying data in a buffer.
- BufferedSink - Interface in okio
-
A sink that keeps a buffer internally so that callers can do small writes without a performance penalty.
- BufferedSource - Interface in okio
-
A source that keeps a buffer internally so that callers can do small reads without a performance penalty.
- Buffer Internals - Search tag in class okio.Buffer.UnsafeCursor
- Section
- ByteString - Class in okio
-
An immutable sequence of bytes.
C
- clear() - Method in class okio.Buffer
-
Discards all bytes in this buffer.
- clearDeadline() - Method in class okio.ForwardingTimeout
- clearDeadline() - Method in class okio.Timeout
-
Clears the deadline.
- clearTimeout() - Method in class okio.ForwardingTimeout
- clearTimeout() - Method in class okio.Timeout
-
Clears the timeout.
- clone() - Method in class okio.Buffer
-
Returns a deep copy of this buffer.
- close() - Method in class okio.Buffer
- close() - Method in class okio.Buffer.UnsafeCursor
- close() - Method in class okio.DeflaterSink
- close() - Method in class okio.ForwardingSink
- close() - Method in class okio.ForwardingSource
- close() - Method in class okio.GzipSink
- close() - Method in class okio.GzipSource
- close() - Method in class okio.InflaterSource
- close() - Method in interface okio.Sink
-
Pushes all buffered bytes to their final destination and releases the resources held by this sink.
- close() - Method in interface okio.Source
-
Closes this source and releases the resources held by this source.
- compareTo(ByteString) - Method in class okio.ByteString
- Comparison with InputStream - Search tag in interface okio.Source
- Section
- Comparison with OutputStream - Search tag in interface okio.Sink
- Section
- completeSegmentByteCount() - Method in class okio.Buffer
-
Returns the number of bytes in segments that are not writable.
- copyTo(OutputStream) - Method in class okio.Buffer
-
Copy the contents of this to
out
. - copyTo(OutputStream, long, long) - Method in class okio.Buffer
-
Copy
byteCount
bytes from this, starting atoffset
, toout
. - copyTo(Buffer, long, long) - Method in class okio.Buffer
-
Copy
byteCount
bytes from this, starting atoffset
, toout
.
D
- data - Variable in class okio.Buffer.UnsafeCursor
- deadline(long, TimeUnit) - Method in class okio.Timeout
-
Set a deadline of now plus
duration
time. - deadlineNanoTime() - Method in class okio.ForwardingTimeout
- deadlineNanoTime() - Method in class okio.Timeout
-
Returns the nano time when the deadline will be reached.
- deadlineNanoTime(long) - Method in class okio.ForwardingTimeout
- deadlineNanoTime(long) - Method in class okio.Timeout
-
Sets the nano time when the deadline will be reached.
- decodeBase64(String) - Static method in class okio.ByteString
-
Decodes the Base64-encoded bytes and returns their value as a byte string.
- decodeHex(String) - Static method in class okio.ByteString
-
Decodes the hex-encoded bytes and returns their value a byte string.
- deflater() - Method in class okio.GzipSink
-
Returns the
Deflater
. - DeflaterSink - Class in okio
-
A sink that uses DEFLATE to compress data written to another source.
- DeflaterSink(Sink, Deflater) - Constructor for class okio.DeflaterSink
- delegate() - Method in class okio.ForwardingSink
-
Sink
to which this instance is delegating. - delegate() - Method in class okio.ForwardingSource
-
Source
to which this instance is delegating. - delegate() - Method in class okio.ForwardingTimeout
-
Timeout
instance to which this instance is currently delegating.
E
- emit() - Method in class okio.Buffer
- emit() - Method in interface okio.BufferedSink
-
Writes all buffered data to the underlying sink, if one exists.
- emitCompleteSegments() - Method in class okio.Buffer
- emitCompleteSegments() - Method in interface okio.BufferedSink
-
Writes complete segments to the underlying sink, if one exists.
- EMPTY - Static variable in class okio.ByteString
-
A singleton empty
ByteString
. - encodeString(String, Charset) - Static method in class okio.ByteString
-
Returns a new byte string containing the
charset
-encoded bytes ofs
. - encodeUtf8(String) - Static method in class okio.ByteString
-
Returns a new byte string containing the
UTF-8
bytes ofs
. - end - Variable in class okio.Buffer.UnsafeCursor
- endsWith(byte[]) - Method in class okio.ByteString
- endsWith(ByteString) - Method in class okio.ByteString
- enter() - Method in class okio.AsyncTimeout
- equals(Object) - Method in class okio.Buffer
- equals(Object) - Method in class okio.ByteString
- exhausted() - Method in class okio.Buffer
- exhausted() - Method in interface okio.BufferedSource
-
Returns true if there are no more bytes in this source.
- exit() - Method in class okio.AsyncTimeout
-
Returns true if the timeout occurred.
- expandBuffer(int) - Method in class okio.Buffer.UnsafeCursor
-
Grow the buffer by adding a contiguous range of capacity in a single segment.
F
- flush() - Method in class okio.Buffer
- flush() - Method in interface okio.BufferedSink
-
Writes all buffered data to the underlying sink, if one exists.
- flush() - Method in class okio.DeflaterSink
- flush() - Method in class okio.ForwardingSink
- flush() - Method in class okio.GzipSink
- flush() - Method in interface okio.Sink
-
Pushes all buffered bytes to their final destination.
- ForwardingSink - Class in okio
-
A
Sink
which forwards calls to another. - ForwardingSink(Sink) - Constructor for class okio.ForwardingSink
- ForwardingSource - Class in okio
-
A
Source
which forwards calls to another. - ForwardingSource(Source) - Constructor for class okio.ForwardingSource
- ForwardingTimeout - Class in okio
-
A
Timeout
which forwards calls to another. - ForwardingTimeout(Timeout) - Constructor for class okio.ForwardingTimeout
G
- get(int) - Method in class okio.Options
- getBuffer() - Method in class okio.Buffer
- getBuffer() - Method in interface okio.BufferedSource
-
This source's internal buffer.
- getByte(int) - Method in class okio.ByteString
-
Returns the byte at
pos
. - getByte(long) - Method in class okio.Buffer
-
Returns the byte at
pos
. - GzipSink - Class in okio
-
A sink that uses GZIP to compress written data to another sink.
- GzipSink(Sink) - Constructor for class okio.GzipSink
- GzipSource - Class in okio
-
A source that uses GZIP to decompress data read from another source.
- GzipSource(Source) - Constructor for class okio.GzipSource
H
- 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.
I
- indexOf(byte) - Method in class okio.Buffer
- indexOf(byte) - Method in interface okio.BufferedSource
-
Equivalent to
indexOf(b, 0)
. - indexOf(byte[]) - Method in class okio.ByteString
- indexOf(byte[], int) - Method in class okio.ByteString
- indexOf(byte, long) - Method in class okio.Buffer
-
Returns the index of
b
in this at or beyondfromIndex
, or -1 if this buffer does not containb
in that range. - indexOf(byte, long) - Method in interface okio.BufferedSource
-
Returns the index of the first
b
in the buffer at or afterfromIndex
. - indexOf(byte, long, long) - Method in class okio.Buffer
- indexOf(byte, long, long) - Method in interface okio.BufferedSource
-
Returns the index of
b
if it is found in the range offromIndex
inclusive totoIndex
exclusive. - indexOf(ByteString) - Method in class okio.Buffer
- indexOf(ByteString) - Method in interface okio.BufferedSource
-
Equivalent to
indexOf(bytes, 0)
. - indexOf(ByteString) - Method in class okio.ByteString
- indexOf(ByteString, int) - Method in class okio.ByteString
- indexOf(ByteString, long) - Method in class okio.Buffer
- indexOf(ByteString, long) - Method in interface okio.BufferedSource
-
Returns the index of the first match for
bytes
in the buffer at or afterfromIndex
. - indexOfElement(ByteString) - Method in class okio.Buffer
- indexOfElement(ByteString) - Method in interface okio.BufferedSource
-
Equivalent to
indexOfElement(targetBytes, 0)
. - indexOfElement(ByteString, long) - Method in class okio.Buffer
- indexOfElement(ByteString, long) - Method in interface okio.BufferedSource
-
Returns the first index in this buffer that is at or after
fromIndex
and that contains any of the bytes intargetBytes
. - InflaterSource - Class in okio
-
A source that uses DEFLATE to decompress data read from another source.
- InflaterSource(Source, Inflater) - Constructor for class okio.InflaterSource
- inputStream() - Method in class okio.Buffer
- inputStream() - Method in interface okio.BufferedSource
-
Returns an input stream that reads from this source.
- Interop with InputStream - Search tag in interface okio.Source
- Section
- Interop with OutputStream - Search tag in interface okio.Sink
- Section
- isOpen() - Method in class okio.Buffer
L
- lastIndexOf(byte[]) - Method in class okio.ByteString
- lastIndexOf(byte[], int) - Method in class okio.ByteString
- lastIndexOf(ByteString) - Method in class okio.ByteString
- lastIndexOf(ByteString, int) - Method in class okio.ByteString
M
- md5() - Method in class okio.Buffer
-
Returns the 128-bit MD5 hash of this buffer.
- md5() - Method in class okio.ByteString
-
Returns the 128-bit MD5 hash of this byte string.
- md5(Sink) - Static method in class okio.HashingSink
-
Returns a sink that uses the obsolete MD5 hash algorithm to produce 128-bit hashes.
- md5(Source) - Static method in class okio.HashingSource
-
Returns a sink that uses the obsolete MD5 hash algorithm to produce 128-bit hashes.
N
- newTimeoutException(IOException) - Method in class okio.AsyncTimeout
-
Returns an
IOException
to represent a timeout. - next() - Method in class okio.Buffer.UnsafeCursor
-
Seeks to the next range of bytes, advancing the offset by
end - start
. - NONE - Static variable in class okio.Timeout
-
An empty timeout that neither tracks nor detects timeouts.
O
- of(byte...) - Static method in class okio.ByteString
-
Returns a new byte string containing a clone of the bytes of
data
. - of(byte[], int, int) - Static method in class okio.ByteString
-
Returns a new byte string containing a copy of
byteCount
bytes ofdata
starting atoffset
. - of(ByteBuffer) - Static method in class okio.ByteString
- of(ByteString...) - Static method in class okio.Options
- offset - Variable in class okio.Buffer.UnsafeCursor
- okio - package okio
- Okio - Class in okio
-
Essential APIs for working with Okio.
- Options - Class in okio
-
An indexed set of values that may be read with
BufferedSource.select(okio.Options)
. - outputStream() - Method in class okio.Buffer
- outputStream() - Method in interface okio.BufferedSink
-
Returns an output stream that writes to this sink.
P
- peek() - Method in class okio.Buffer
- peek() - Method in interface okio.BufferedSource
-
Returns a new
BufferedSource
that can read data from thisBufferedSource
without consuming it. - Pipe - Class in okio
-
A source and a sink that are attached.
- Pipe(long) - Constructor for class okio.Pipe
R
- rangeEquals(int, byte[], int, int) - Method in class okio.ByteString
-
Returns true if the bytes of this in
[offset..offset+byteCount)
equal the bytes ofother
in[otherOffset..otherOffset+byteCount)
. - rangeEquals(int, ByteString, int, int) - Method in class okio.ByteString
-
Returns true if the bytes of this in
[offset..offset+byteCount)
equal the bytes ofother
in[otherOffset..otherOffset+byteCount)
. - rangeEquals(long, ByteString) - Method in class okio.Buffer
- rangeEquals(long, ByteString) - Method in interface okio.BufferedSource
-
Returns true if the bytes at
offset
in this source equalbytes
. - rangeEquals(long, ByteString, int, int) - Method in class okio.Buffer
- rangeEquals(long, ByteString, int, int) - Method in interface okio.BufferedSource
-
Returns true if
byteCount
bytes atoffset
in this source equalbytes
atbytesOffset
. - read(byte[]) - Method in class okio.Buffer
- read(byte[]) - Method in interface okio.BufferedSource
-
Removes up to
sink.length
bytes from this and copies them intosink
. - read(byte[], int, int) - Method in class okio.Buffer
- read(byte[], int, int) - Method in interface okio.BufferedSource
-
Removes up to
byteCount
bytes from this and copies them intosink
atoffset
. - read(InputStream, int) - Static method in class okio.ByteString
-
Reads
count
bytes fromin
and returns the result. - read(ByteBuffer) - Method in class okio.Buffer
- read(Buffer, long) - Method in class okio.Buffer
- 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 tosink
. - 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() - Method in interface okio.BufferedSource
-
Removes all bytes from this and returns them as a byte array.
- readByteArray(long) - Method in class okio.Buffer
- 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() - Method in interface okio.BufferedSource
-
Removes all bytes bytes from this and returns them as a byte string.
- readByteString(long) - Method in class okio.Buffer
- 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 fromin
to this. - readFully(byte[]) - Method in class okio.Buffer
- readFully(byte[]) - Method in interface okio.BufferedSource
-
Removes exactly
sink.length
bytes from this and copies them intosink
. - readFully(Buffer, long) - Method in class okio.Buffer
- readFully(Buffer, long) - Method in interface okio.BufferedSource
-
Removes exactly
byteCount
bytes from this and appends them tosink
. - 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(long, Charset) - Method in class okio.Buffer
- readString(long, Charset) - Method in interface okio.BufferedSource
-
Removes
byteCount
bytes from this, decodes them ascharset
, and returns the string. - readString(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. - readUnsafe() - Method in class okio.Buffer
- readUnsafe(Buffer.UnsafeCursor) - Method in class okio.Buffer
- readUtf8() - 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 class okio.Buffer
- 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() - Method in interface okio.BufferedSource
-
Removes and returns characters up to but not including the next line break.
- readUtf8LineStrict(long) - Method in class okio.Buffer
- readUtf8LineStrict(long) - Method in interface okio.BufferedSource
-
Like
BufferedSource.readUtf8LineStrict()
, except this allows the caller to specify the longest allowed match. - 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.
S
- seek(long) - Method in class okio.Buffer.UnsafeCursor
-
Reposition the cursor so that the data at
offset
is readable atdata[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() - Method in class okio.Pipe
- sink(File) - Static method in class okio.Okio
-
Returns a sink that writes to
file
. - 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(Path, OpenOption...) - Static method in class okio.Okio
-
Returns a sink that writes to
path
. - sink(Sink) - Method in class okio.AsyncTimeout
-
Returns a new sink that delegates to
sink
, using this to implement timeouts. - 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
-
Returns the number of bytes used to encode
string
as UTF-8 when usingByteString.encodeUtf8(java.lang.String)
orBuffer.writeUtf8(String)
. - size(String, int, int) - Static method in class okio.Utf8
-
Returns the number of bytes used to encode the slice of
string
as UTF-8 when usingBufferedSink.writeUtf8(String, int, int)
. - 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() - Method in class okio.Pipe
- source(File) - Static method in class okio.Okio
-
Returns a source that reads from
file
. - source(InputStream) - Static method in class okio.Okio
-
Returns a source that reads from
in
. - source(Socket) - Static method in class okio.Okio
-
Returns a source that reads from
socket
. - source(Path, OpenOption...) - Static method in class okio.Okio
-
Returns a source that reads from
path
. - source(Source) - Method in class okio.AsyncTimeout
-
Returns a new source that delegates to
source
, using this to implement timeouts. - Source - Interface in okio
-
Supplies a stream of bytes.
- start - Variable in class okio.Buffer.UnsafeCursor
- startsWith(byte[]) - Method in class okio.ByteString
- startsWith(ByteString) - Method in class okio.ByteString
- string(Charset) - Method in class okio.ByteString
-
Constructs a new
String
by decoding the bytes usingcharset
. - 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 specifiedendIndex
. - Sync flush - Search tag in class okio.DeflaterSink
- Section
- Sync flush - Search tag in class okio.GzipSink
- Section
T
- throwIfReached() - Method in class okio.ForwardingTimeout
- throwIfReached() - Method in class okio.Timeout
-
Throws an
InterruptedIOException
if the deadline has been reached or if the current thread has been interrupted. - timedOut() - Method in class okio.AsyncTimeout
-
Invoked by the watchdog thread when the time between calls to
AsyncTimeout.enter()
andAsyncTimeout.exit()
has exceeded the timeout. - timeout() - Method in class okio.Buffer
- timeout() - Method in class okio.DeflaterSink
- timeout() - Method in class okio.ForwardingSink
- timeout() - Method in class okio.ForwardingSource
- timeout() - Method in class okio.GzipSink
- timeout() - Method in class okio.GzipSource
- timeout() - Method in class okio.InflaterSource
- timeout() - Method in interface okio.Sink
-
Returns the timeout for this sink.
- timeout() - Method in interface okio.Source
-
Returns the timeout for this source.
- timeout(long, TimeUnit) - Method in class okio.ForwardingTimeout
- timeout(long, TimeUnit) - Method in class okio.Timeout
-
Wait at most
timeout
time before aborting an operation. - Timeout - Class in okio
-
A policy on how much time to spend on a task before giving up.
- Timeout() - Constructor for class okio.Timeout
- timeoutNanos() - Method in class okio.ForwardingTimeout
- timeoutNanos() - Method in class okio.Timeout
-
Returns the timeout in nanoseconds, or
0
for no timeout. - Timeouts and Deadlines - Search tag in class okio.Timeout
- Section
- toAsciiLowercase() - Method in class okio.ByteString
-
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'.
- toAsciiUppercase() - Method in class okio.ByteString
-
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'.
- toByteArray() - Method in class okio.ByteString
-
Returns a byte array containing a copy of the bytes in this
ByteString
. - toString() - Method in class okio.Buffer
-
Returns a human-readable string that describes the contents of this buffer.
- toString() - Method in class okio.ByteString
-
Returns a human-readable string that describes the contents of this byte string.
- toString() - Method in class okio.DeflaterSink
- toString() - Method in class okio.ForwardingSink
- toString() - Method in class okio.ForwardingSource
U
- UnsafeCursor() - Constructor for class okio.Buffer.UnsafeCursor
- Unsafe Cursor API - Search tag in class okio.Buffer.UnsafeCursor
- Section
- utf8() - Method in class okio.ByteString
-
Constructs a new
String
by decoding the bytes asUTF-8
. - Utf8 - Class in okio
-
Okio assumes most applications use UTF-8 exclusively, and offers optimized implementations of common operations on UTF-8 strings.
W
- waitUntilNotified(Object) - Method in class okio.Timeout
-
Waits on
monitor
until it is notified. - Warnings - Search tag in class okio.Buffer.UnsafeCursor
- Section
- write(byte[]) - Method in class okio.Buffer
- 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 class okio.Buffer
- write(byte[], int, int) - Method in interface okio.BufferedSink
-
Like
OutputStream.write(byte[], int, int)
, this writesbyteCount
bytes ofsource
, starting atoffset
. - write(OutputStream) - Method in class okio.ByteString
-
Writes the contents of this byte string to
out
. - write(ByteBuffer) - Method in class okio.Buffer
- write(Buffer, long) - Method in class okio.Buffer
- 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 fromsource
and appends them to this. - write(ByteString) - Method in class okio.Buffer
- write(ByteString) - Method in interface okio.BufferedSink
- write(Source, long) - Method in class okio.Buffer
- write(Source, long) - Method in interface okio.BufferedSink
-
Removes
byteCount
bytes fromsource
and appends them to this sink. - 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, int, int, Charset) - Method in class okio.Buffer
- writeString(String, int, int, Charset) - Method in interface okio.BufferedSink
-
Encodes the characters at
beginIndex
up toendIndex
fromstring
incharset
and writes it to this sink. - writeString(String, Charset) - Method in class okio.Buffer
- writeString(String, Charset) - Method in interface okio.BufferedSink
-
Encodes
string
incharset
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 toout
. - writeUtf8(String) - 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 class okio.Buffer
- writeUtf8(String, int, int) - Method in interface okio.BufferedSink
-
Encodes the characters at
beginIndex
up toendIndex
fromstring
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.
All Classes and Interfaces|All Packages|Serialized Form