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

A

abort() - Method in class com.squareup.okhttp.internal.DiskLruCache.Editor
Aborts this edit.
abortUnlessCommitted() - Method in class com.squareup.okhttp.internal.DiskLruCache.Editor
 
AbstractOutputStream - Class in com.squareup.okhttp.internal
An output stream for an HTTP request body.
AbstractOutputStream() - Constructor for class com.squareup.okhttp.internal.AbstractOutputStream
 
acceptCacheResponseType(CacheResponse) - Method in class com.squareup.okhttp.internal.http.HttpEngine
Returns true if cacheResponse is of the right type.
acceptCacheResponseType(CacheResponse) - Method in class com.squareup.okhttp.internal.http.HttpsEngine
 
add(String, String) - Method in class com.squareup.okhttp.internal.http.RawHeaders
Add a field with the specified value.
addAll(String, List<String>) - Method in class com.squareup.okhttp.internal.http.RawHeaders
 
addCookies(Map<String, List<String>>) - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
addLine(String) - Method in class com.squareup.okhttp.internal.http.RawHeaders
Add an HTTP header line containing a field name, a literal colon, and a value.
addRequestProperty(String, String) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
addRequestProperty(String, String) - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
Address - Class in com.squareup.okhttp
A specification for a connection to an origin server.
Address(String, int, SSLSocketFactory, HostnameVerifier, OkAuthenticator, Proxy, List<String>) - Constructor for class com.squareup.okhttp.Address
 
addSpdyRequestHeaders(String, String, String, String, String) - Method in class com.squareup.okhttp.internal.http.RawHeaders
 
authenticate(Proxy, URL, List<OkAuthenticator.Challenge>) - Method in interface com.squareup.okhttp.OkAuthenticator
Returns a credential that satisfies the authentication challenge made by url.
authenticateProxy(Proxy, URL, List<OkAuthenticator.Challenge>) - Method in interface com.squareup.okhttp.OkAuthenticator
Returns a credential that satisfies the authentication challenge made by proxy.
automaticallyReleaseConnectionToPool() - Method in class com.squareup.okhttp.internal.http.HttpEngine
Cause the socket connection to be released to the connection pool when it is no longer needed.

B

Base64 - Class in com.squareup.okhttp.internal
Base64 encoder/decoder.
basic(String, String) - Static method in class com.squareup.okhttp.OkAuthenticator.Credential
Returns an auth credential for the Basic scheme.
build() - Method in class com.squareup.okhttp.internal.spdy.SpdyConnection.Builder
 
Builder(boolean, Socket) - Constructor for class com.squareup.okhttp.internal.spdy.SpdyConnection.Builder
 
Builder(boolean, InputStream, OutputStream) - Constructor for class com.squareup.okhttp.internal.spdy.SpdyConnection.Builder
 
Builder(String, boolean, Socket) - Constructor for class com.squareup.okhttp.internal.spdy.SpdyConnection.Builder
 
Builder(String, boolean, InputStream, OutputStream) - Constructor for class com.squareup.okhttp.internal.spdy.SpdyConnection.Builder
 

C

cancel(Object) - Method in class com.squareup.okhttp.OkHttpClient
Cancels all scheduled tasks tagged with tag.
Challenge(String, String) - Constructor for class com.squareup.okhttp.OkAuthenticator.Challenge
 
charset() - Method in class com.squareup.okhttp.MediaType
Returns the charset of this media type, or null if this media type doesn't specify a charset.
charset(Charset) - Method in class com.squareup.okhttp.MediaType
Returns the charset of this media type, or defaultValue if this media type doesn't specify a charset.
checkNotClosed() - Method in class com.squareup.okhttp.internal.AbstractOutputStream
 
checkOffsetAndCount(int, int, int) - Static method in class com.squareup.okhttp.internal.Util
 
chooseResponseSource(long, RequestHeaders) - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
Returns the source to satisfy request given this cached response.
client - Variable in class com.squareup.okhttp.apache.OkApacheClient
 
client - Variable in class com.squareup.okhttp.internal.http.HttpEngine
 
close() - Method in class com.squareup.okhttp.Connection
 
close() - Method in class com.squareup.okhttp.HttpResponseCache
 
close() - Method in class com.squareup.okhttp.internal.DiskLruCache
Closes this cache.
close() - Method in class com.squareup.okhttp.internal.DiskLruCache.Snapshot
 
close() - Method in class com.squareup.okhttp.internal.FaultRecoveringOutputStream
 
close() - Method in class com.squareup.okhttp.internal.spdy.SpdyConnection
Closes this connection.
close(ErrorCode) - Method in class com.squareup.okhttp.internal.spdy.SpdyStream
Abnormally terminate this stream.
close() - Method in class com.squareup.okhttp.internal.StrictLineReader
Closes the reader by closing the underlying InputStream and marking this reader as closed.
closeAll(Closeable, Closeable) - Static method in class com.squareup.okhttp.internal.Util
Closes a and b.
closed - Variable in class com.squareup.okhttp.internal.AbstractOutputStream
 
closeLater(ErrorCode) - Method in class com.squareup.okhttp.internal.spdy.SpdyStream
Abnormally terminate this stream.
closeQuietly(Closeable) - Static method in class com.squareup.okhttp.internal.Util
Closes closeable, ignoring any checked exceptions.
closeQuietly(Socket) - Static method in class com.squareup.okhttp.internal.Util
Closes socket, ignoring any checked exceptions.
com.squareup.okhttp - package com.squareup.okhttp
 
com.squareup.okhttp.apache - package com.squareup.okhttp.apache
 
com.squareup.okhttp.guide - package com.squareup.okhttp.guide
 
com.squareup.okhttp.internal - package com.squareup.okhttp.internal
 
com.squareup.okhttp.internal.http - package com.squareup.okhttp.internal.http
 
com.squareup.okhttp.internal.spdy - package com.squareup.okhttp.internal.spdy
 
com.squareup.okhttp.internal.tls - package com.squareup.okhttp.internal.tls
 
com.squareup.okhttp.sample - package com.squareup.okhttp.sample
 
combine(ResponseHeaders) - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
Combines this cached header with a network header as defined by RFC 2616, 13.5.3.
commit() - Method in class com.squareup.okhttp.internal.DiskLruCache.Editor
Commits this edit so it is visible to readers.
connect(int, int, TunnelRequest) - Method in class com.squareup.okhttp.Connection
 
connect() - Method in class com.squareup.okhttp.internal.http.HttpEngine
Connect to the origin server either directly or via a proxy.
connect() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
connect() - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
connected(Connection) - Method in class com.squareup.okhttp.internal.http.HttpEngine
Called after a socket connection has been created or retrieved from the pool.
connected(Connection) - Method in class com.squareup.okhttp.internal.http.HttpsEngine
 
connected(Route) - Method in class com.squareup.okhttp.RouteDatabase
Records success connecting to failedRoute.
connectFailed(Connection, IOException) - Method in class com.squareup.okhttp.internal.http.RouteSelector
Clients should invoke this method when they encounter a connectivity failure on a connection returned by this route selector.
Connection - Class in com.squareup.okhttp
Holds the sockets and streams of an HTTP, HTTPS, or HTTPS+SPDY connection, which may be used for multiple HTTP request/response exchanges.
Connection(Route) - Constructor for class com.squareup.okhttp.Connection
 
connection - Variable in class com.squareup.okhttp.internal.http.HttpEngine
 
connectionHeader() - Method in interface com.squareup.okhttp.internal.spdy.FrameWriter
HTTP/2.0 only.
ConnectionPool - Class in com.squareup.okhttp
Manages reuse of HTTP and SPDY connections for reduced network latency.
ConnectionPool(int, long) - Constructor for class com.squareup.okhttp.ConnectionPool
 
connectSocket(Socket, InetSocketAddress, int) - Method in class com.squareup.okhttp.internal.Platform
 
copy(InputStream, OutputStream) - Static method in class com.squareup.okhttp.internal.Util
Copies all of the bytes from in to out.
createRequestBody() - Method in class com.squareup.okhttp.internal.http.HttpTransport
 
createRequestBody() - Method in class com.squareup.okhttp.internal.http.SpdyTransport
 
createURLStreamHandler(String) - Method in class com.squareup.okhttp.OkHttpClient

D

daemonThreadFactory(String) - Static method in class com.squareup.okhttp.internal.Util
 
data(boolean, int, InputStream, int) - Method in interface com.squareup.okhttp.internal.spdy.FrameReader.Handler
 
data(boolean, int, byte[]) - Method in interface com.squareup.okhttp.internal.spdy.FrameWriter
 
data(boolean, int, byte[], int, int) - Method in interface com.squareup.okhttp.internal.spdy.FrameWriter
 
decode(byte[]) - Static method in class com.squareup.okhttp.internal.Base64
 
decode(byte[], int) - Static method in class com.squareup.okhttp.internal.Base64
 
DEFAULT - Static variable in interface com.squareup.okhttp.internal.Dns
 
DEFAULT_CHUNK_LENGTH - Static variable in class com.squareup.okhttp.internal.http.HttpTransport
 
delete() - Method in class com.squareup.okhttp.HttpResponseCache
Closes the cache and deletes all of its stored values.
delete() - Method in class com.squareup.okhttp.internal.DiskLruCache
Closes the cache and deletes all of its stored values.
deleteContents(File) - Static method in class com.squareup.okhttp.internal.Util
Deletes the contents of dir.
disconnect() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
disconnect() - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
DiskLruCache - Class in com.squareup.okhttp.internal
A cache that uses a bounded amount of space on a filesystem.
DiskLruCache.Editor - Class in com.squareup.okhttp.internal
Edits the values for an entry.
DiskLruCache.Snapshot - Class in com.squareup.okhttp.internal
A snapshot of the values for an entry.
Dns - Interface in com.squareup.okhttp.internal
Domain name service.

E

edit(String) - Method in class com.squareup.okhttp.internal.DiskLruCache
Returns an editor for the entry named key, or null if another edit is in progress.
edit() - Method in class com.squareup.okhttp.internal.DiskLruCache.Snapshot
Returns an editor for this snapshot's entry, or null if either the entry has changed since this snapshot was created or if another edit is in progress.
EMPTY_BYTE_ARRAY - Static variable in class com.squareup.okhttp.internal.Util
 
EMPTY_STRING_ARRAY - Static variable in class com.squareup.okhttp.internal.Util
 
enableTlsExtensions(SSLSocket, String) - Method in class com.squareup.okhttp.internal.Platform
Attempt a TLS connection with useful extensions enabled.
encode(byte[]) - Static method in class com.squareup.okhttp.internal.Base64
 
equal(Object, Object) - Static method in class com.squareup.okhttp.internal.Util
Returns true if two possibly-null objects are equal.
equals(Object) - Method in class com.squareup.okhttp.Address
 
equals(Object) - Method in class com.squareup.okhttp.MediaType
 
equals(Object) - Method in class com.squareup.okhttp.OkAuthenticator.Challenge
 
equals(Object) - Method in class com.squareup.okhttp.OkAuthenticator.Credential
 
equals(Object) - Method in class com.squareup.okhttp.Route
 
ErrorCode - Enum in com.squareup.okhttp.internal.spdy
 
evictAll() - Method in class com.squareup.okhttp.ConnectionPool
Close and remove all connections in the pool.
execute(HttpUriRequest) - Method in class com.squareup.okhttp.apache.OkApacheClient
 
execute(HttpUriRequest, HttpContext) - Method in class com.squareup.okhttp.apache.OkApacheClient
 
execute(HttpHost, HttpRequest) - Method in class com.squareup.okhttp.apache.OkApacheClient
 
execute(HttpHost, HttpRequest, HttpContext) - Method in class com.squareup.okhttp.apache.OkApacheClient
 
execute(HttpUriRequest, ResponseHandler<? extends T>) - Method in class com.squareup.okhttp.apache.OkApacheClient
 
execute(HttpUriRequest, ResponseHandler<? extends T>, HttpContext) - Method in class com.squareup.okhttp.apache.OkApacheClient
 
execute(HttpHost, HttpRequest, ResponseHandler<? extends T>) - Method in class com.squareup.okhttp.apache.OkApacheClient
 
execute(HttpHost, HttpRequest, ResponseHandler<? extends T>, HttpContext) - Method in class com.squareup.okhttp.apache.OkApacheClient
 
execute() - Method in class com.squareup.okhttp.internal.NamedRunnable
 

F

failed(Route, IOException) - Method in class com.squareup.okhttp.RouteDatabase
Records a failure connecting to failedRoute.
failedRoutesCount() - Method in class com.squareup.okhttp.RouteDatabase
 
FaultRecoveringOutputStream - Class in com.squareup.okhttp.internal
An output stream wrapper that recovers from failures in the underlying stream by replacing it with another stream.
FaultRecoveringOutputStream(int, OutputStream) - Constructor for class com.squareup.okhttp.internal.FaultRecoveringOutputStream
 
flush() - Method in class com.squareup.okhttp.HttpResponseCache
 
flush() - Method in class com.squareup.okhttp.internal.DiskLruCache
Force buffered operations to the filesystem.
flush() - Method in class com.squareup.okhttp.internal.FaultRecoveringOutputStream
 
flush() - Method in interface com.squareup.okhttp.internal.spdy.FrameWriter
SPDY/3 only.
flush() - Method in class com.squareup.okhttp.internal.spdy.SpdyConnection
 
flushRequest() - Method in class com.squareup.okhttp.internal.http.HttpTransport
 
flushRequest() - Method in class com.squareup.okhttp.internal.http.SpdyTransport
 
FrameReader - Interface in com.squareup.okhttp.internal.spdy
Reads transport frames for SPDY/3 or HTTP/2.0.
FrameReader.Handler - Interface in com.squareup.okhttp.internal.spdy
 
FrameWriter - Interface in com.squareup.okhttp.internal.spdy
Writes transport frames for SPDY/3 or HTTP/2.0.
fromBytes(InputStream) - Static method in class com.squareup.okhttp.internal.http.RawHeaders
Parses bytes of a response header from an HTTP transport.
fromHttp2(int) - Static method in enum com.squareup.okhttp.internal.spdy.ErrorCode
 
fromMultimap(Map<String, List<String>>, boolean) - Static method in class com.squareup.okhttp.internal.http.RawHeaders
Creates a new instance from the given map of fields to values.
fromNameValueBlock(List<String>) - Static method in class com.squareup.okhttp.internal.http.RawHeaders
Returns headers for a name value block containing a SPDY response.
fromSpdy3Rst(int) - Static method in enum com.squareup.okhttp.internal.spdy.ErrorCode
 
fromSpdyGoAway(int) - Static method in enum com.squareup.okhttp.internal.spdy.ErrorCode
 

G

get(Address) - Method in class com.squareup.okhttp.ConnectionPool
Returns a recycled connection to address, or null if no such connection exists.
get(URI, String, Map<String, List<String>>) - Method in class com.squareup.okhttp.HttpResponseCache
 
get(String) - Method in class com.squareup.okhttp.internal.DiskLruCache
Returns a snapshot of the entry named key, or null if it doesn't exist is not currently readable.
get(URI, String, Map<String, List<String>>) - Method in class com.squareup.okhttp.internal.http.OkResponseCacheAdapter
 
get(String) - Method in class com.squareup.okhttp.internal.http.RawHeaders
Returns the last value corresponding to the specified field, or null.
get() - Static method in class com.squareup.okhttp.internal.Platform
 
get(URI, String, Map<String, List<String>>) - Method in interface com.squareup.okhttp.OkResponseCache
 
getAcceptEncoding() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
getAddress() - Method in class com.squareup.okhttp.Route
Returns the Address of this route.
getAll(Set<String>) - Method in class com.squareup.okhttp.internal.http.RawHeaders
 
getAllByName(String) - Method in interface com.squareup.okhttp.internal.Dns
 
getAllowUserInteraction() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getAuthenticator() - Method in class com.squareup.okhttp.Address
Returns the client's authenticator.
getAuthenticator() - Method in class com.squareup.okhttp.OkHttpClient
 
getCacheResponse() - Method in class com.squareup.okhttp.internal.http.HttpEngine
 
getChunkLength() - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
getChunkLength() - Method in interface com.squareup.okhttp.internal.http.Policy
 
getCipherSuite() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getConnection() - Method in class com.squareup.okhttp.internal.http.HttpEngine
 
getConnection() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
getConnection() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
getConnection() - Method in class com.squareup.okhttp.internal.spdy.SpdyStream
 
getConnectionCount() - Method in class com.squareup.okhttp.ConnectionPool
Returns total number of connections in the pool.
getConnectionManager() - Method in class com.squareup.okhttp.apache.OkApacheClient
 
getConnectionPool() - Method in class com.squareup.okhttp.OkHttpClient
 
getConnectTimeout() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getConnectTimeout() - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
getConnectTimeout() - Method in class com.squareup.okhttp.OkHttpClient
Default connect timeout (in milliseconds).
getContent() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getContent(Class[]) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getContentEncoding() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getContentEncoding() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
getContentLength() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getContentLength() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
getContentLength() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
getContentType() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getContentType() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
getCookieHandler() - Method in class com.squareup.okhttp.OkHttpClient
 
getDate() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getDefault() - Static method in class com.squareup.okhttp.ConnectionPool
 
getDefaultPort(String) - Static method in class com.squareup.okhttp.internal.Util
 
getDefaultUseCaches() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getDefaultUserAgent() - Static method in class com.squareup.okhttp.internal.http.HttpEngine
 
getDirectory() - Method in class com.squareup.okhttp.HttpResponseCache
 
getDirectory() - Method in class com.squareup.okhttp.internal.DiskLruCache
Returns the directory where this cache stores its data.
getDoInput() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getDoOutput() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getEffectivePort(URI) - Static method in class com.squareup.okhttp.internal.Util
 
getEffectivePort(URL) - Static method in class com.squareup.okhttp.internal.Util
 
getErrorCode() - Method in class com.squareup.okhttp.internal.spdy.SpdyStream
Returns the reason why this stream was closed, or null if it closed normally or has not yet been closed.
getErrorStream() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getErrorStream() - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
Returns an input stream from the server in the case of error such as the requested file (txt, htm, html) is not found on the remote server.
getEtag() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
GetExample - Class in com.squareup.okhttp.guide
 
GetExample() - Constructor for class com.squareup.okhttp.guide.GetExample
 
getExpiration() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getExpires() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
getFieldName(int) - Method in class com.squareup.okhttp.internal.http.RawHeaders
Returns the field at position or null if that is out of range.
getFixedContentLength() - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
getFixedContentLength() - Method in interface com.squareup.okhttp.internal.http.Policy
 
getFollowProtocolRedirects() - Method in class com.squareup.okhttp.OkHttpClient
 
getHeaderField(int) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getHeaderField(String) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getHeaderField(int) - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
Returns the value of the field at position.
getHeaderField(String) - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
Returns the value of the field corresponding to the fieldName, or null if there is no such field.
getHeaderFieldDate(String, long) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getHeaderFieldInt(String, int) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getHeaderFieldKey(int) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getHeaderFieldKey(int) - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
getHeaderFields() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getHeaderFields() - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
getHeaders() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
getHeaders() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
getHeaderValue() - Method in class com.squareup.okhttp.OkAuthenticator.Credential
 
getHitCount() - Method in class com.squareup.okhttp.HttpResponseCache
 
getHost() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
getHostnameVerifier() - Method in class com.squareup.okhttp.Address
Returns the hostname verifier, or null if this is not an HTTPS address.
getHostnameVerifier() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getHostnameVerifier() - Method in class com.squareup.okhttp.OkHttpClient
 
getHttpConnectionCount() - Method in class com.squareup.okhttp.ConnectionPool
Returns total number of http connections in the pool.
getHttpConnectionToCache() - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
getHttpConnectionToCache() - Method in interface com.squareup.okhttp.internal.http.Policy
Returns the HttpURLConnection instance to store in the cache.
getHttpEngine() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getHttpEngine() - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
getHttpMinorVersion() - Method in class com.squareup.okhttp.Connection
Returns the minor HTTP version that should be used for future requests on this connection.
getHttpMinorVersion() - Method in class com.squareup.okhttp.internal.http.RawHeaders
Returns the status line's HTTP minor version.
getIdleStartTimeNs() - Method in class com.squareup.okhttp.Connection
Returns the time in ns when this connection became idle.
getIdleStartTimeNs() - Method in class com.squareup.okhttp.internal.spdy.SpdyConnection
Returns the time in ns when this connection became idle or 0L if connection is not idle.
getIfModifiedSince() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getIfModifiedSince() - Method in interface com.squareup.okhttp.internal.http.Policy
Returns the If-Modified-Since timestamp, or 0 if none is set.
getIfModifiedSince() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
getIfNoneMatch() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
getInputStream(int) - Method in class com.squareup.okhttp.internal.DiskLruCache.Snapshot
Returns the unbuffered stream with the value for index.
getInputStream() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getInputStream() - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
getInputStream() - Method in class com.squareup.okhttp.internal.spdy.SpdyStream
Returns an input stream that can be used to read data from the peer.
getInstanceFollowRedirects() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getLastModified() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getLastModified() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
getLength(int) - Method in class com.squareup.okhttp.internal.DiskLruCache.Snapshot
Returns the byte length of the value for index.
getLocalCertificates() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getLocalPrincipal() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getMaxAgeSeconds() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
getMaxAgeSeconds() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
getMaxSize() - Method in class com.squareup.okhttp.HttpResponseCache
 
getMaxSize() - Method in class com.squareup.okhttp.internal.DiskLruCache
Returns the maximum number of bytes that this cache should use to store its data.
getMaxStaleSeconds() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
getMinFreshSeconds() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
getMtu(Socket) - Method in class com.squareup.okhttp.internal.Platform
Returns the maximum transmission unit of the network interface used by socket, or a reasonable default if this platform doesn't expose the MTU to the application layer.
getNetworkCount() - Method in class com.squareup.okhttp.HttpResponseCache
 
getNpnSelectedProtocol(SSLSocket) - Method in class com.squareup.okhttp.internal.Platform
Returns the negotiated protocol, or null if no protocol was negotiated.
getOkResponseCache() - Method in class com.squareup.okhttp.OkHttpClient
 
getOriginAddress(URL) - Static method in class com.squareup.okhttp.internal.http.HttpEngine
 
getOutputStream() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getOutputStream() - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
getOutputStream() - Method in class com.squareup.okhttp.internal.spdy.SpdyStream
Returns an output stream that can be used to write data to the peer.
getParams() - Method in class com.squareup.okhttp.apache.OkApacheClient
 
getPeerPrincipal() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getPermission() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getPermission() - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
getPrefix() - Method in class com.squareup.okhttp.internal.Platform
Prefix used on custom headers.
getProxy() - Method in class com.squareup.okhttp.Address
Returns this address's explicitly-specified HTTP proxy, or null to delegate to the HTTP client's proxy selector.
getProxy() - Method in class com.squareup.okhttp.OkHttpClient
 
getProxy() - Method in class com.squareup.okhttp.Route
Returns the Proxy of this route.
getProxyAuthorization() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
getProxySelector() - Method in class com.squareup.okhttp.OkHttpClient
 
getReadTimeout() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getReadTimeout() - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
getReadTimeout() - Method in class com.squareup.okhttp.OkHttpClient
Default read timeout (in milliseconds).
getReadTimeoutMillis() - Method in class com.squareup.okhttp.internal.spdy.SpdyStream
 
getRealm() - Method in class com.squareup.okhttp.OkAuthenticator.Challenge
Returns the protection space.
getRequestBody() - Method in class com.squareup.okhttp.internal.http.HttpEngine
Returns the request body or null if this request doesn't have a body.
getRequestCount() - Method in class com.squareup.okhttp.HttpResponseCache
 
getRequestHeaders() - Method in class com.squareup.okhttp.internal.http.HttpEngine
 
getRequestHeaders() - Method in class com.squareup.okhttp.internal.spdy.SpdyStream
 
getRequestMethod() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getRequestProperties() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getRequestProperties() - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
getRequestProperty(String) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getRequestProperty(String) - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
getResponseBody() - Method in class com.squareup.okhttp.internal.http.HttpEngine
 
getResponseCache() - Method in class com.squareup.okhttp.OkHttpClient
 
getResponseCode() - Method in class com.squareup.okhttp.internal.http.HttpEngine
 
getResponseCode() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getResponseCode() - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
getResponseCode() - Method in class com.squareup.okhttp.internal.http.RawHeaders
Returns the HTTP status code or -1 if it is unknown.
getResponseHeaders() - Method in class com.squareup.okhttp.internal.http.HttpEngine
 
getResponseHeaders() - Method in class com.squareup.okhttp.internal.spdy.SpdyStream
Returns the stream's response headers, blocking if necessary if they have not been received yet.
getResponseMessage() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getResponseMessage() - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
getResponseMessage() - Method in class com.squareup.okhttp.internal.http.RawHeaders
Returns the HTTP status message or null if it is unknown.
getRoute() - Method in class com.squareup.okhttp.Connection
Returns the route used by this connection.
getRoutesDatabase() - Method in class com.squareup.okhttp.OkHttpClient
 
getScheme() - Method in class com.squareup.okhttp.OkAuthenticator.Challenge
Returns the authentication scheme, like Basic.
getServedDate() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
getServerCertificates() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getSize() - Method in class com.squareup.okhttp.HttpResponseCache
 
getSMaxAgeSeconds() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
getSocket() - Method in class com.squareup.okhttp.Connection
Returns the socket that this connection uses, or null if the connection is not currently connected.
getSocketAddress() - Method in class com.squareup.okhttp.Route
Returns the InetSocketAddress of this route.
getSpdyConnection() - Method in class com.squareup.okhttp.Connection
 
getSpdyConnectionCount() - Method in class com.squareup.okhttp.ConnectionPool
Returns total number of spdy connections in the pool.
getSslSocket() - Method in class com.squareup.okhttp.internal.http.HttpsEngine
 
getSslSocketFactory() - Method in class com.squareup.okhttp.Address
Returns the SSL socket factory, or null if this is not an HTTPS address.
getSSLSocketFactory() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getSslSocketFactory() - Method in class com.squareup.okhttp.OkHttpClient
 
getStatusLine() - Method in class com.squareup.okhttp.internal.http.RawHeaders
 
getString(int) - Method in class com.squareup.okhttp.internal.DiskLruCache.Editor
Returns the last committed value as a string, or null if no value has been committed.
getString(int) - Method in class com.squareup.okhttp.internal.DiskLruCache.Snapshot
Returns the string value for index.
getTransferEncoding() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
getTransferStream(CacheRequest) - Method in class com.squareup.okhttp.internal.http.HttpTransport
 
getTransferStream(CacheRequest) - Method in class com.squareup.okhttp.internal.http.SpdyTransport
 
getTransports() - Method in class com.squareup.okhttp.Address
Returns the client's transports.
getTransports() - Method in class com.squareup.okhttp.OkHttpClient
 
getTunnelConfig() - Method in class com.squareup.okhttp.internal.http.HttpEngine
 
getTunnelConfig() - Method in class com.squareup.okhttp.internal.http.HttpsEngine
 
getUri() - Method in class com.squareup.okhttp.internal.http.HttpEngine
 
getUri() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
getUri() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
getUriHost() - Method in class com.squareup.okhttp.Address
Returns the hostname of the origin server.
getUriPort() - Method in class com.squareup.okhttp.Address
Returns the port of the origin server; typically 80 or 443.
getURL() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getURL() - Method in interface com.squareup.okhttp.internal.http.Policy
Returns the current destination URL, possibly a redirect.
getUseCaches() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
getUseCaches() - Method in interface com.squareup.okhttp.internal.http.Policy
Returns true if HTTP response caches should be used.
getUserAgent() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
getValue(int) - Method in class com.squareup.okhttp.internal.http.RawHeaders
Returns the value at index or null if that is out of range.
getVaryFields() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
getWriteAbortCount() - Method in class com.squareup.okhttp.HttpResponseCache
 
getWriteSuccessCount() - Method in class com.squareup.okhttp.HttpResponseCache
 
goAway(int, ErrorCode) - Method in interface com.squareup.okhttp.internal.spdy.FrameReader.Handler
 
goAway(int, ErrorCode) - Method in interface com.squareup.okhttp.internal.spdy.FrameWriter
 

H

handler(IncomingStreamHandler) - Method in class com.squareup.okhttp.internal.spdy.SpdyConnection.Builder
 
hasAuthorization() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
hasConditions() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
Returns true if the request contains conditions that save the server from sending a response that the client has locally.
hasConnectionClose() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
hasConnectionClose() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
hashCode() - Method in class com.squareup.okhttp.Address
 
hashCode() - Method in class com.squareup.okhttp.MediaType
 
hashCode() - Method in class com.squareup.okhttp.OkAuthenticator.Challenge
 
hashCode() - Method in class com.squareup.okhttp.OkAuthenticator.Credential
 
hashCode() - Method in class com.squareup.okhttp.Route
 
hasNext() - Method in class com.squareup.okhttp.internal.http.RouteSelector
Returns true if there's another route to attempt.
hasResponse() - Method in class com.squareup.okhttp.internal.http.HttpEngine
 
hasResponseBody() - Method in class com.squareup.okhttp.internal.http.HttpEngine
Returns true if the response must have a (possibly 0-length) body.
hasVaryAll() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
Returns true if a Vary header contains an asterisk.
headers(int, List<String>) - Method in interface com.squareup.okhttp.internal.spdy.FrameReader.Handler
 
headers(int, List<String>) - Method in interface com.squareup.okhttp.internal.spdy.FrameWriter
 
http20Draft04() - Method in class com.squareup.okhttp.internal.spdy.SpdyConnection.Builder
 
HTTP_CONTINUE - Static variable in class com.squareup.okhttp.internal.http.HttpEngine
 
HttpAuthenticator - Class in com.squareup.okhttp.internal.http
Handles HTTP authentication headers from origin and proxy servers.
httpCode - Variable in enum com.squareup.okhttp.internal.spdy.ErrorCode
 
HttpEngine - Class in com.squareup.okhttp.internal.http
Handles a single HTTP request/response pair.
HttpEngine(OkHttpClient, Policy, String, RawHeaders, Connection, RetryableOutputStream) - Constructor for class com.squareup.okhttp.internal.http.HttpEngine
 
httpEngine - Variable in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
httpEngineFailure - Variable in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
HttpResponseCache - Class in com.squareup.okhttp
Caches HTTP and HTTPS responses to the filesystem so they may be reused, saving time and bandwidth.
HttpResponseCache(File, long) - Constructor for class com.squareup.okhttp.HttpResponseCache
 
HttpsEngine - Class in com.squareup.okhttp.internal.http
 
HttpsEngine(OkHttpClient, Policy, String, RawHeaders, Connection, RetryableOutputStream) - Constructor for class com.squareup.okhttp.internal.http.HttpsEngine
 
HttpsURLConnectionImpl - Class in com.squareup.okhttp.internal.http
 
HttpsURLConnectionImpl(URL, OkHttpClient) - Constructor for class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
HttpTransport - Class in com.squareup.okhttp.internal.http
 
HttpTransport(HttpEngine, OutputStream, InputStream) - Constructor for class com.squareup.okhttp.internal.http.HttpTransport
 
HttpURLConnectionImpl - Class in com.squareup.okhttp.internal.http
This implementation uses HttpEngine to send requests and receive responses.
HttpURLConnectionImpl(URL, OkHttpClient) - Constructor for class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 

I

immutableList(List<T>) - Static method in class com.squareup.okhttp.internal.Util
Returns an immutable copy of list.
includeAuthorityInRequestLine() - Method in class com.squareup.okhttp.internal.http.HttpEngine
Returns true if the request line should contain the full URL with host and port (like "GET http://android.com/foo HTTP/1.1") or only the path (like "GET /foo HTTP/1.1").
includeAuthorityInRequestLine() - Method in class com.squareup.okhttp.internal.http.HttpsEngine
 
IncomingStreamHandler - Interface in com.squareup.okhttp.internal.spdy
Listener to be notified when a connected peer creates a new stream.
INSTANCE - Static variable in class com.squareup.okhttp.internal.tls.OkHostnameVerifier
 
isAlive() - Method in class com.squareup.okhttp.Connection
Returns true if this connection is alive.
isCacheable(RequestHeaders) - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
Returns true if this response can be stored to later serve another request.
isChunked() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
isChunked() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
isClosed() - Method in class com.squareup.okhttp.HttpResponseCache
 
isClosed() - Method in class com.squareup.okhttp.internal.AbstractOutputStream
Returns true if this stream was closed locally.
isClosed() - Method in class com.squareup.okhttp.internal.DiskLruCache
Returns true if this cache has been closed.
isConnected() - Method in class com.squareup.okhttp.Connection
Returns true if Connection.connect(int, int, com.squareup.okhttp.TunnelRequest) has been attempted on this connection.
isContentEncodingGzip() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
isExpired(long) - Method in class com.squareup.okhttp.Connection
Returns true if this connection has been idle for longer than keepAliveDurationNs.
isIdle() - Method in class com.squareup.okhttp.Connection
Returns true if this connection is idle.
isIdle() - Method in class com.squareup.okhttp.internal.spdy.SpdyConnection
Returns true if this connection is idle.
isLocallyInitiated() - Method in class com.squareup.okhttp.internal.spdy.SpdyStream
Returns true if this stream was created by this peer.
isModernTls() - Method in class com.squareup.okhttp.Route
Returns true if this route uses modern TLS.
isMustRevalidate() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
isNoCache() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
isNoCache() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
isNoStore() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
ISO_8859_1 - Static variable in class com.squareup.okhttp.internal.Util
A cheap and type-safe constant for the ISO-8859-1 Charset.
isOnlyIfCached() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
isOpen() - Method in class com.squareup.okhttp.internal.spdy.SpdyStream
Returns true if this stream is open.
isPublic() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
isReadable() - Method in class com.squareup.okhttp.Connection
Returns true if we are confident that we can read data from this connection.
isRecoverable() - Method in class com.squareup.okhttp.internal.FaultRecoveringOutputStream
Returns true if errors in the underlying stream can currently be recovered.
isSpdy() - Method in class com.squareup.okhttp.Connection
Returns true if this is a SPDY connection.

L

length() - Method in class com.squareup.okhttp.internal.http.RawHeaders
Returns the number of field values.
logW(String) - Method in class com.squareup.okhttp.internal.Platform
 

M

main(String[]) - Static method in class com.squareup.okhttp.guide.GetExample
 
main(String[]) - Static method in class com.squareup.okhttp.guide.PostExample
 
main(String...) - Static method in class com.squareup.okhttp.sample.OkHttpContributors
 
makeReusable(boolean, OutputStream, InputStream) - Method in class com.squareup.okhttp.internal.http.HttpTransport
 
makeReusable(boolean, OutputStream, InputStream) - Method in class com.squareup.okhttp.internal.http.SpdyTransport
 
maybeRemove(String, URI) - Method in class com.squareup.okhttp.internal.http.OkResponseCacheAdapter
 
maybeRemove(String, URI) - Method in interface com.squareup.okhttp.OkResponseCache
Remove any cache entries for the supplied uri if the request method invalidates.
maybeShare(Connection) - Method in class com.squareup.okhttp.ConnectionPool
Shares the SPDY connection with the pool.
MediaType - Class in com.squareup.okhttp
An RFC 2045 Media Type, appropriate to describe the content type of an HTTP request or response body.
method - Variable in class com.squareup.okhttp.internal.http.HttpEngine
 

N

NamedRunnable - Class in com.squareup.okhttp.internal
Runnable implementation which always sets its thread name.
NamedRunnable(String, Object...) - Constructor for class com.squareup.okhttp.internal.NamedRunnable
 
names() - Method in class com.squareup.okhttp.internal.http.RawHeaders
Returns an immutable case-insensitive set of header names.
newDeflaterOutputStream(OutputStream, Deflater, boolean) - Method in class com.squareup.okhttp.internal.Platform
Returns a deflater output stream that supports SYNC_FLUSH for SPDY name value blocks.
newInputStream(int) - Method in class com.squareup.okhttp.internal.DiskLruCache.Editor
Returns an unbuffered input stream to read the last committed value, or null if no value has been committed.
newOutputStream(int) - Method in class com.squareup.okhttp.internal.DiskLruCache.Editor
Returns a new unbuffered output stream to write the value at index.
newStream(List<String>, boolean, boolean) - Method in class com.squareup.okhttp.internal.spdy.SpdyConnection
Returns a new locally-initiated stream.
newTransport(HttpEngine) - Method in class com.squareup.okhttp.Connection
Returns the transport appropriate for this connection.
next(String) - Method in class com.squareup.okhttp.internal.http.RouteSelector
Returns the next route address to attempt.
nextFrame(FrameReader.Handler) - Method in interface com.squareup.okhttp.internal.spdy.FrameReader
 
noop() - Method in interface com.squareup.okhttp.internal.spdy.FrameReader.Handler
 
noop() - Method in interface com.squareup.okhttp.internal.spdy.FrameWriter
 
noop() - Method in class com.squareup.okhttp.internal.spdy.SpdyConnection
Sends a noop frame to the peer.

O

OkApacheClient - Class in com.squareup.okhttp.apache
Implements Apache's HttpClient API using OkHttpClient.
OkApacheClient() - Constructor for class com.squareup.okhttp.apache.OkApacheClient
 
OkApacheClient(OkHttpClient) - Constructor for class com.squareup.okhttp.apache.OkApacheClient
 
OkAuthenticator - Interface in com.squareup.okhttp
Responds to authentication challenges from the remote web or proxy server by returning credentials.
OkAuthenticator.Challenge - Class in com.squareup.okhttp
An RFC 2617 challenge.
OkAuthenticator.Credential - Class in com.squareup.okhttp
An RFC 2617 credential.
OkHostnameVerifier - Class in com.squareup.okhttp.internal.tls
A HostnameVerifier consistent with RFC 2818.
OkHttpClient - Class in com.squareup.okhttp
Configures and creates HTTP connections.
OkHttpClient() - Constructor for class com.squareup.okhttp.OkHttpClient
 
OkHttpContributors - Class in com.squareup.okhttp.sample
 
OkResponseCache - Interface in com.squareup.okhttp
An extended response cache API.
OkResponseCacheAdapter - Class in com.squareup.okhttp.internal.http
 
OkResponseCacheAdapter(ResponseCache) - Constructor for class com.squareup.okhttp.internal.http.OkResponseCacheAdapter
 
open(File, int, int, long) - Static method in class com.squareup.okhttp.internal.DiskLruCache
Opens the cache in directory, creating a cache if none exists there.
open(URL) - Method in class com.squareup.okhttp.OkHttpClient
 
openConnection(URL) - Method in class com.squareup.okhttp.apache.OkApacheClient
Returns a new HttpURLConnection customized for this application.
openStreamCount() - Method in class com.squareup.okhttp.internal.spdy.SpdyConnection
Returns the number of open streams on this connection.

P

parse(String) - Static method in class com.squareup.okhttp.MediaType
Returns a media type for string, or null if string is not a well-formed media type.
ping(boolean, int, int) - Method in interface com.squareup.okhttp.internal.spdy.FrameReader.Handler
 
ping(boolean, int, int) - Method in interface com.squareup.okhttp.internal.spdy.FrameWriter
 
Ping - Class in com.squareup.okhttp.internal.spdy
A locally-originated ping.
ping() - Method in class com.squareup.okhttp.internal.spdy.SpdyConnection
Sends a ping frame to the peer.
Platform - Class in com.squareup.okhttp.internal
Access to Platform-specific features necessary for SPDY and advanced TLS.
Platform() - Constructor for class com.squareup.okhttp.internal.Platform
 
pokeInt(byte[], int, int, ByteOrder) - Static method in class com.squareup.okhttp.internal.Util
 
policy - Variable in class com.squareup.okhttp.internal.http.HttpEngine
 
Policy - Interface in com.squareup.okhttp.internal.http
 
PostExample - Class in com.squareup.okhttp.guide
 
PostExample() - Constructor for class com.squareup.okhttp.guide.PostExample
 
priority(int, int) - Method in interface com.squareup.okhttp.internal.spdy.FrameReader.Handler
 
processAuthHeader(OkAuthenticator, int, RawHeaders, RawHeaders, Proxy, URL) - Static method in class com.squareup.okhttp.internal.http.HttpAuthenticator
React to a failed authorization response by looking up new credentials.
put(URI, URLConnection) - Method in class com.squareup.okhttp.HttpResponseCache
 
put(URI, URLConnection) - Method in class com.squareup.okhttp.internal.http.OkResponseCacheAdapter
 
put(URI, URLConnection) - Method in interface com.squareup.okhttp.OkResponseCache
 

R

RawHeaders - Class in com.squareup.okhttp.internal.http
The HTTP status and unparsed header fields of a single HTTP message.
RawHeaders() - Constructor for class com.squareup.okhttp.internal.http.RawHeaders
 
RawHeaders(RawHeaders) - Constructor for class com.squareup.okhttp.internal.http.RawHeaders
 
readAsciiLine(InputStream) - Static method in class com.squareup.okhttp.internal.Util
Returns the ASCII characters up to but not including the next "\r\n", or "\n".
readFully(InputStream, byte[]) - Static method in class com.squareup.okhttp.internal.Util
Fills 'dst' with bytes from 'in', throwing EOFException if insufficient bytes are available.
readFully(InputStream, byte[], int, int) - Static method in class com.squareup.okhttp.internal.Util
Reads exactly 'byteCount' bytes from 'in' (into 'dst' at offset 'offset'), and throws EOFException if insufficient bytes are available.
readFully(Reader) - Static method in class com.squareup.okhttp.internal.Util
Returns the remainder of 'reader' as a string, closing it when done.
readHeaders(InputStream, RawHeaders) - Static method in class com.squareup.okhttp.internal.http.RawHeaders
Reads headers or trailers into out.
readInt() - Method in class com.squareup.okhttp.internal.StrictLineReader
Read an int from a line containing its decimal representation.
readLine() - Method in class com.squareup.okhttp.internal.StrictLineReader
Reads the next line.
readResponse() - Method in class com.squareup.okhttp.internal.http.HttpEngine
Flushes the remaining request header and body, parses the HTTP response headers and starts reading the HTTP response body if it exists.
readResponseHeaders() - Method in class com.squareup.okhttp.internal.http.HttpTransport
 
readResponseHeaders() - Method in class com.squareup.okhttp.internal.http.SpdyTransport
 
readSingleByte(InputStream) - Static method in class com.squareup.okhttp.internal.Util
Implements InputStream.read(int) in terms of InputStream.read(byte[], int, int).
receive(SpdyStream) - Method in interface com.squareup.okhttp.internal.spdy.IncomingStreamHandler
Handle a new stream from this connection's peer.
receiveHeaders(RawHeaders) - Method in class com.squareup.okhttp.internal.http.HttpEngine
 
recycle(Connection) - Method in class com.squareup.okhttp.ConnectionPool
Gives connection to the pool.
REFUSE_INCOMING_STREAMS - Static variable in interface com.squareup.okhttp.internal.spdy.IncomingStreamHandler
 
release(boolean) - Method in class com.squareup.okhttp.internal.http.HttpEngine
Releases this engine so that its resources may be either reused or closed.
remove(String) - Method in class com.squareup.okhttp.internal.DiskLruCache
Drops the entry for key if it exists and can be removed.
removeAll(String) - Method in class com.squareup.okhttp.internal.http.RawHeaders
 
replacementStream(IOException) - Method in class com.squareup.okhttp.internal.FaultRecoveringOutputStream
Returns a replacement output stream to recover from e thrown by the previous stream.
replaceStream(OutputStream) - Method in class com.squareup.okhttp.internal.FaultRecoveringOutputStream
Replaces the current output stream with replacementStream, writing any replay bytes to it if they exist.
reply(List<String>, boolean) - Method in class com.squareup.okhttp.internal.spdy.SpdyStream
Sends a reply to an incoming stream.
RequestHeaders - Class in com.squareup.okhttp.internal.http
Parsed HTTP request headers.
RequestHeaders(URI, RawHeaders) - Constructor for class com.squareup.okhttp.internal.http.RequestHeaders
 
requestPath(URL) - Static method in class com.squareup.okhttp.internal.http.HttpEngine
Returns the path to request, like the '/' in 'GET / HTTP/1.1'.
requiresConnection() - Method in enum com.squareup.okhttp.ResponseSource
 
requiresTunnel() - Method in class com.squareup.okhttp.Connection
Returns true if the HTTP connection needs to tunnel one protocol over another, such as when using HTTPS through an HTTP proxy.
resetIdleStartTime() - Method in class com.squareup.okhttp.Connection
 
ResponseHeaders - Class in com.squareup.okhttp.internal.http
Parsed HTTP response headers.
ResponseHeaders(URI, RawHeaders) - Constructor for class com.squareup.okhttp.internal.http.ResponseHeaders
 
ResponseSource - Enum in com.squareup.okhttp
The source of an HTTP response.
roundTripTime() - Method in class com.squareup.okhttp.internal.spdy.Ping
Returns the round trip time for this ping in nanoseconds, waiting for the response to arrive if necessary.
roundTripTime(long, TimeUnit) - Method in class com.squareup.okhttp.internal.spdy.Ping
Returns the round trip time for this ping in nanoseconds, or -1 if the response was cancelled, or -2 if the timeout elapsed before the round trip completed.
Route - Class in com.squareup.okhttp
Represents the route used by a connection to reach an endpoint.
Route(Address, Proxy, InetSocketAddress, boolean) - Constructor for class com.squareup.okhttp.Route
 
RouteDatabase - Class in com.squareup.okhttp
A blacklist of failed routes to avoid when creating a new connection to a target address.
RouteDatabase() - Constructor for class com.squareup.okhttp.RouteDatabase
 
routeSelector - Variable in class com.squareup.okhttp.internal.http.HttpEngine
 
RouteSelector - Class in com.squareup.okhttp.internal.http
Selects routes to connect to an origin server.
RouteSelector(Address, URI, ProxySelector, ConnectionPool, Dns, RouteDatabase) - Constructor for class com.squareup.okhttp.internal.http.RouteSelector
 
rstStream(int, ErrorCode) - Method in interface com.squareup.okhttp.internal.spdy.FrameReader.Handler
 
rstStream(int, ErrorCode) - Method in interface com.squareup.okhttp.internal.spdy.FrameWriter
 
run() - Method in class com.squareup.okhttp.internal.NamedRunnable
 

S

sendConnectionHeader() - Method in class com.squareup.okhttp.internal.spdy.SpdyConnection
Sends a connection header if the current variant requires it.
sendRequest() - Method in class com.squareup.okhttp.internal.http.HttpEngine
Figures out what the response source will be, and opens a socket to that source if necessary.
set(int, String) - Method in class com.squareup.okhttp.internal.DiskLruCache.Editor
Sets the value at index to value.
set(String, String) - Method in class com.squareup.okhttp.internal.http.RawHeaders
Set a field with the specified value.
setAcceptEncoding(String) - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
setAllowUserInteraction(boolean) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
setAuthenticator(OkAuthenticator) - Method in class com.squareup.okhttp.OkHttpClient
Sets the authenticator used to respond to challenges from the remote web server or proxy server.
setChunked() - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
setChunkedStreamingMode(int) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
setConnection(String) - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
setConnectionPool(ConnectionPool) - Method in class com.squareup.okhttp.OkHttpClient
Sets the connection pool used to recycle HTTP and HTTPS connections.
setConnectTimeout(int) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
setConnectTimeout(int) - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
setConnectTimeout(long, TimeUnit) - Method in class com.squareup.okhttp.OkHttpClient
Sets the default connect timeout for new connections.
setContentLength(long) - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
setContentType(String) - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
setCookieHandler(CookieHandler) - Method in class com.squareup.okhttp.OkHttpClient
Sets the cookie handler to be used to read outgoing cookies and write incoming cookies.
setDefaultUseCaches(boolean) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
setDoInput(boolean) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
setDoOutput(boolean) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
setFixedLengthStreamingMode(int) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
setFixedLengthStreamingMode(int) - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
setFixedLengthStreamingMode(long) - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
setFollowProtocolRedirects(boolean) - Method in class com.squareup.okhttp.OkHttpClient
Configure this client to follow redirects from HTTPS to HTTP and from HTTP to HTTPS.
setHost(String) - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
setHostnameVerifier(HostnameVerifier) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
setHostnameVerifier(HostnameVerifier) - Method in class com.squareup.okhttp.OkHttpClient
Sets the verifier used to confirm that response certificates apply to requested hostnames for HTTPS connections.
setHttpMinorVersion(int) - Method in class com.squareup.okhttp.Connection
 
setIfModifiedSince(long) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
setIfModifiedSince(Date) - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
setIfNoneMatch(String) - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
setInstanceFollowRedirects(boolean) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
setLocalTimestamps(long, long) - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
setMaxSize(long) - Method in class com.squareup.okhttp.internal.DiskLruCache
Changes the maximum number of bytes the cache can store and queues a job to trim the existing store, if necessary.
setNpnProtocols(SSLSocket, byte[]) - Method in class com.squareup.okhttp.internal.Platform
Sets client-supported protocols on a socket to send to a server.
setProxy(Proxy) - Method in class com.squareup.okhttp.OkHttpClient
Sets the HTTP proxy that will be used by connections created by this client.
setProxySelector(ProxySelector) - Method in class com.squareup.okhttp.OkHttpClient
Sets the proxy selection policy to be used if no proxy is specified explicitly.
setReadTimeout(int) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
setReadTimeout(int) - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
setReadTimeout(long) - Method in class com.squareup.okhttp.internal.spdy.SpdyStream
Sets the maximum time to wait on input stream reads before failing with a SocketTimeoutException, or 0 to wait indefinitely.
setReadTimeout(long, TimeUnit) - Method in class com.squareup.okhttp.OkHttpClient
Sets the default read timeout for new connections.
setRequestLine(String) - Method in class com.squareup.okhttp.internal.http.RawHeaders
Sets the request line (like "GET / HTTP/1.1").
setRequestMethod(String) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
setRequestProperty(String, String) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
setRequestProperty(String, String) - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
setResponseCache(ResponseCache) - Method in class com.squareup.okhttp.OkHttpClient
Sets the response cache to be used to read and write cached responses.
setResponseSource(ResponseSource) - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
setSSLSocketFactory(SSLSocketFactory) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
setSslSocketFactory(SSLSocketFactory) - Method in class com.squareup.okhttp.OkHttpClient
Sets the socket factory used to secure HTTPS connections.
setStatusLine(String) - Method in class com.squareup.okhttp.internal.http.RawHeaders
Sets the response status line (like "HTTP/1.0 200 OK").
settings(boolean, Settings) - Method in interface com.squareup.okhttp.internal.spdy.FrameReader.Handler
 
settings(Settings) - Method in interface com.squareup.okhttp.internal.spdy.FrameWriter
 
setTransport(String) - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
setTransports(List<String>) - Method in class com.squareup.okhttp.OkHttpClient
Configure the transports used by this client to communicate with remote servers.
setUseCaches(boolean) - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
setUserAgent(String) - Method in class com.squareup.okhttp.internal.http.RequestHeaders
 
shouldPostpone(Route) - Method in class com.squareup.okhttp.RouteDatabase
Returns true if route has failed recently and should be avoided.
shutdown(ErrorCode) - Method in class com.squareup.okhttp.internal.spdy.SpdyConnection
Degrades this connection such that new streams can neither be created locally, nor accepted from the remote peer.
size() - Method in class com.squareup.okhttp.internal.DiskLruCache
Returns the number of bytes currently being used to store the values in this cache.
skipAll(InputStream) - Static method in class com.squareup.okhttp.internal.Util
 
skipByReading(InputStream, long) - Static method in class com.squareup.okhttp.internal.Util
Call in.read() repeatedly until either the stream is exhausted or byteCount bytes have been read.
spdy3() - Method in class com.squareup.okhttp.internal.spdy.SpdyConnection.Builder
 
SpdyConnection - Class in com.squareup.okhttp.internal.spdy
A socket connection to a remote peer.
SpdyConnection.Builder - Class in com.squareup.okhttp.internal.spdy
 
spdyGoAwayCode - Variable in enum com.squareup.okhttp.internal.spdy.ErrorCode
 
spdyRstCode - Variable in enum com.squareup.okhttp.internal.spdy.ErrorCode
 
SpdyStream - Class in com.squareup.okhttp.internal.spdy
A logical bidirectional stream.
SpdyTransport - Class in com.squareup.okhttp.internal.http
 
SpdyTransport(HttpEngine, SpdyConnection) - Constructor for class com.squareup.okhttp.internal.http.SpdyTransport
 
StrictLineReader - Class in com.squareup.okhttp.internal
Buffers input from an InputStream for reading lines.
StrictLineReader(InputStream, Charset) - Constructor for class com.squareup.okhttp.internal.StrictLineReader
Constructs a new LineReader with the specified charset and the default capacity.
StrictLineReader(InputStream, int, Charset) - Constructor for class com.squareup.okhttp.internal.StrictLineReader
Constructs a new LineReader with the specified capacity and charset.
stripContentEncoding() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
stripContentLength() - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
 
subtype() - Method in class com.squareup.okhttp.MediaType
Returns a specific media subtype, such as "plain" or "png", "mpeg", "mp4" or "xml".
supportTlsIntolerantServer(SSLSocket) - Method in class com.squareup.okhttp.internal.Platform
Attempt a secure connection with basic functionality to maximize compatibility.
synReply(boolean, int, List<String>) - Method in interface com.squareup.okhttp.internal.spdy.FrameReader.Handler
 
synReply(boolean, int, List<String>) - Method in interface com.squareup.okhttp.internal.spdy.FrameWriter
 
synStream(boolean, boolean, int, int, int, int, List<String>) - Method in interface com.squareup.okhttp.internal.spdy.FrameReader.Handler
 
synStream(boolean, boolean, int, int, int, int, List<String>) - Method in interface com.squareup.okhttp.internal.spdy.FrameWriter
 
SYSTEM_DEFAULT - Static variable in class com.squareup.okhttp.internal.http.HttpAuthenticator
Uses the global authenticator to get the password.

T

tagSocket(Socket) - Method in class com.squareup.okhttp.internal.Platform
 
toBytes() - Method in class com.squareup.okhttp.internal.http.RawHeaders
Returns bytes of a request header for sending on an HTTP transport.
toMultimap(boolean) - Method in class com.squareup.okhttp.internal.http.RawHeaders
Returns an immutable map containing each field to its list of values.
toNameValueBlock() - Method in class com.squareup.okhttp.internal.http.RawHeaders
Returns a list of alternating names and values.
toString() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
toString() - Method in class com.squareup.okhttp.MediaType
Returns the encoded media type, like "text/plain; charset=utf-8", appropriate for use in a Content-Type header.
toString() - Method in class com.squareup.okhttp.OkAuthenticator.Challenge
 
toString() - Method in class com.squareup.okhttp.OkAuthenticator.Credential
 
toUriLenient(URL) - Method in class com.squareup.okhttp.internal.Platform
 
trackConditionalCacheHit() - Method in class com.squareup.okhttp.internal.http.OkResponseCacheAdapter
 
trackConditionalCacheHit() - Method in interface com.squareup.okhttp.OkResponseCache
Track an conditional GET that was satisfied by this cache.
trackResponse(ResponseSource) - Method in class com.squareup.okhttp.internal.http.OkResponseCacheAdapter
 
trackResponse(ResponseSource) - Method in interface com.squareup.okhttp.OkResponseCache
Track an HTTP response being satisfied by source.
TunnelRequest - Class in com.squareup.okhttp
Routing and authentication information sent to an HTTP proxy to create a HTTPS to an origin server.
TunnelRequest(String, int, String, String) - Constructor for class com.squareup.okhttp.TunnelRequest
 
type() - Method in class com.squareup.okhttp.MediaType
Returns the high-level media type, such as "text", "image", "audio", "video", or "application".

U

untagSocket(Socket) - Method in class com.squareup.okhttp.internal.Platform
 
update(CacheResponse, HttpURLConnection) - Method in class com.squareup.okhttp.internal.http.OkResponseCacheAdapter
 
update(CacheResponse, HttpURLConnection) - Method in interface com.squareup.okhttp.OkResponseCache
Handles a conditional request hit by updating the stored cache response with the headers from httpConnection.
US_ASCII - Static variable in class com.squareup.okhttp.internal.Util
A cheap and type-safe constant for the US-ASCII Charset.
usingProxy() - Method in class com.squareup.okhttp.internal.http.HttpsURLConnectionImpl
 
usingProxy() - Method in class com.squareup.okhttp.internal.http.HttpURLConnectionImpl
 
usingProxy() - Method in interface com.squareup.okhttp.internal.http.Policy
Returns true if a non-direct proxy is specified.
UTF_8 - Static variable in class com.squareup.okhttp.internal.Util
A cheap and type-safe constant for the UTF-8 Charset.
Util - Class in com.squareup.okhttp.internal
Junk drawer of utility methods.

V

validate(ResponseHeaders) - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
Returns true if this cached response should be used; false if the network response should be used.
valueOf(String) - Static method in enum com.squareup.okhttp.internal.spdy.ErrorCode
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.squareup.okhttp.ResponseSource
Returns the enum constant of this type with the specified name.
values(String) - Method in class com.squareup.okhttp.internal.http.RawHeaders
Returns an immutable list of the header values for name.
values() - Static method in enum com.squareup.okhttp.internal.spdy.ErrorCode
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.squareup.okhttp.ResponseSource
Returns an array containing the constants of this enum type, in the order they are declared.
varyMatches(Map<String, List<String>>, Map<String, List<String>>) - Method in class com.squareup.okhttp.internal.http.ResponseHeaders
Returns true if none of the Vary headers on this response have changed between cachedRequest and newRequest.
verify(String, SSLSession) - Method in class com.squareup.okhttp.internal.tls.OkHostnameVerifier
 
verify(String, X509Certificate) - Method in class com.squareup.okhttp.internal.tls.OkHostnameVerifier
 
verifyHostName(String, String) - Method in class com.squareup.okhttp.internal.tls.OkHostnameVerifier
Returns true if hostName matches the name or pattern cn.

W

WINDOW_UPDATE_THRESHOLD - Static variable in class com.squareup.okhttp.internal.spdy.SpdyStream
The number of unacknowledged bytes at which the input stream will send the peer a WINDOW_UPDATE frame.
windowUpdate(int, int, boolean) - Method in interface com.squareup.okhttp.internal.spdy.FrameReader.Handler
 
windowUpdate(int, int) - Method in interface com.squareup.okhttp.internal.spdy.FrameWriter
 
write(int) - Method in class com.squareup.okhttp.internal.AbstractOutputStream
 
write(byte[], int, int) - Method in class com.squareup.okhttp.internal.FaultRecoveringOutputStream
 
writeData(int, boolean, byte[], int, int) - Method in class com.squareup.okhttp.internal.spdy.SpdyConnection
 
writeRequestBody(RetryableOutputStream) - Method in class com.squareup.okhttp.internal.http.HttpTransport
 
writeRequestBody(RetryableOutputStream) - Method in class com.squareup.okhttp.internal.http.SpdyTransport
 
writeRequestHeaders() - Method in class com.squareup.okhttp.internal.http.HttpTransport
Prepares the HTTP headers and sends them to the server.
writeRequestHeaders() - Method in class com.squareup.okhttp.internal.http.SpdyTransport
 
writeSingleByte(OutputStream, int) - Static method in class com.squareup.okhttp.internal.Util
Implements OutputStream.write(int) in terms of OutputStream.write(byte[], int, int).
writingRequestHeaders() - Method in class com.squareup.okhttp.internal.http.HttpEngine
Called immediately before the transport transmits HTTP request headers.
A B C D E F G H I L M N O P R S T U V W 
Skip navigation links

Copyright © 2014. All rights reserved.