Skip navigation links
A B C D E F G H I N O R S T U W 

A

appendingSink(File) - Static method in class okio.Okio
Returns a sink that appends to file.
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.
Buffer - Class in okio
A collection of bytes in memory.
Buffer() - Constructor for class okio.Buffer
 
buffer() - Method in class okio.Buffer
 
buffer() - Method in interface okio.BufferedSink
Returns this sink's internal buffer.
buffer() - Method in interface okio.BufferedSource
Returns this source's internal buffer.
buffer(Source) - Static method in class okio.Okio
Returns a new source that buffers reads from source.
buffer(Sink) - Static method in class okio.Okio
Returns a new sink that buffers writes to sink.
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.
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.Timeout
Clears the deadline.
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.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.
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 at offset, to out.
copyTo(Buffer, long, long) - Method in class okio.Buffer
Copy byteCount bytes from this, starting at offset, to out.

D

deadline(long, TimeUnit) - Method in class okio.Timeout
Set a deadline of now plus duration time.
deadlineNanoTime() - Method in class okio.Timeout
Returns the nano time when the deadline will be reached.
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.
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.

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.
encodeUtf8(String) - Static method in class okio.ByteString
Returns a new byte string containing the UTF-8 bytes of s.
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.

F

flush() - Method in class okio.Buffer
 
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
 

G

getByte(long) - Method in class okio.Buffer
Returns the byte at pos.
getByte(int) - Method in class okio.ByteString
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.Timeout
Returns true if a deadline is enabled.
hashCode() - Method in class okio.Buffer
 
hashCode() - Method in class okio.ByteString
 
hex() - Method in class okio.ByteString
Returns this byte string encoded in hexadecimal.

I

indexOf(byte) - Method in class okio.Buffer
 
indexOf(byte, long) - Method in class okio.Buffer
Returns the index of b in this at or beyond fromIndex, or -1 if this buffer does not contain b in that range.
indexOf(byte) - Method in interface okio.BufferedSource
Returns the index of the first b in the buffer.
indexOf(byte, long) - Method in interface okio.BufferedSource
Returns the index of the first b in the buffer at or after fromIndex.
indexOfElement(ByteString) - Method in class okio.Buffer
 
indexOfElement(ByteString, long) - Method in class okio.Buffer
 
indexOfElement(ByteString) - Method in interface okio.BufferedSource
Returns the index of the first byte in targetBytes in the buffer.
indexOfElement(ByteString, long) - Method in interface okio.BufferedSource
Returns the index of the first byte in targetBytes in the buffer at or after fromIndex.
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.

N

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 of data starting at offset.
okio - package okio
Okio complements java.io and java.nio to make it much easier to access, store, and process your data.
Okio - Class in okio
Essential APIs for working with Okio.
outputStream() - Method in class okio.Buffer
 
outputStream() - Method in interface okio.BufferedSink
Returns an output stream that writes to this sink.

R

read(byte[]) - Method in class okio.Buffer
 
read(byte[], int, int) - 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.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.
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.
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.
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.
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.
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.
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.

S

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 - 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.
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.
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 - Interface in okio
Supplies a stream of bytes.

T

throwIfReached() - Method in class okio.Timeout
Throws an IOException 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() and AsyncTimeout.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 - Class in okio
A policy on how much time to spend on a task before giving up.
Timeout() - Constructor for class okio.Timeout
 
timeout(long, TimeUnit) - Method in class okio.Timeout
Wait at most timeout time before aborting an operation.
timeoutNanos() - Method in class okio.Timeout
Returns the timeout in nanoseconds, or 0 for no timeout.
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
 
toString() - Method in class okio.ByteString
 
toString() - Method in class okio.DeflaterSink
 
toString() - Method in class okio.ForwardingSink
 
toString() - Method in class okio.ForwardingSource
 

U

utf8() - Method in class okio.ByteString
Constructs a new String by decoding the bytes as UTF-8.

W

write(ByteString) - Method in class okio.Buffer
 
write(byte[]) - Method in class okio.Buffer
 
write(byte[], int, int) - 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 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.
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, Charset) - Method in interface okio.BufferedSink
Encodes 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) - Method in interface okio.BufferedSink
Encodes string in UTF-8 and writes it to this sink.
A B C D E F G H I N O R S T U W 
Skip navigation links

Copyright © 2015. All rights reserved.