| 限定符和类型 | 方法和说明 |
|---|---|
Sink |
CacheRequest.body() |
Sink |
DiskLruCache.Editor.newSink(int index)
Returns a new unbuffered output stream to write the value at
index. |
| 限定符和类型 | 方法和说明 |
|---|---|
Sink |
Exchange.createRequestBody(Request request,
boolean duplex) |
| 限定符和类型 | 方法和说明 |
|---|---|
Sink |
ExchangeCodec.createRequestBody(Request request,
long contentLength)
Returns an output stream where the request body can be streamed.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Sink |
Http1ExchangeCodec.createRequestBody(Request request,
long contentLength) |
| 限定符和类型 | 方法和说明 |
|---|---|
Sink |
Http2ExchangeCodec.createRequestBody(Request request,
long contentLength) |
Sink |
Http2Stream.getSink()
Returns a sink that can be used to write data to the peer.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Sink |
FileSystem.appendingSink(File file)
Writes to
file, appending if data is already present. |
Sink |
FileSystem.sink(File file)
Writes to
file, discarding any data already present. |
| 限定符和类型 | 接口和说明 |
|---|---|
interface |
BufferedSink
A sink that keeps a buffer internally so that callers can do small writes without a performance
penalty.
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
Buffer
A collection of bytes in memory.
|
class |
DeflaterSink
A sink that uses DEFLATE to compress data
written to another source.
|
class |
ForwardingSink
A
Sink which forwards calls to another. |
class |
GzipSink
A sink that uses GZIP to compress written data
to another sink.
|
class |
HashingSink
A sink that computes a hash of the full stream of bytes it has accepted.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static Sink |
Okio.appendingSink(File file)
Returns a sink that appends to
file. |
static Sink |
Okio.blackhole()
Returns a sink that writes nowhere.
|
Sink |
ForwardingSink.delegate()
Sink to which this instance is delegating. |
Sink |
Pipe.sink() |
static Sink |
Okio.sink(File file)
Returns a sink that writes to
file. |
static Sink |
Okio.sink(OutputStream out)
Returns a sink that writes to
out. |
static Sink |
Okio.sink(Path path,
OpenOption... options)
Returns a sink that writes to
path. |
Sink |
AsyncTimeout.sink(Sink sink)
Returns a new sink that delegates to
sink, using this to implement timeouts. |
static Sink |
Okio.sink(Socket socket)
Returns a sink that writes to
socket. |
| 限定符和类型 | 方法和说明 |
|---|---|
static BufferedSink |
Okio.buffer(Sink sink)
Returns a new sink that buffers writes to
sink. |
void |
Pipe.fold(Sink sink)
Writes any buffered contents of this pipe to
sink, then replace this pipe's source with
sink. |
static HashingSink |
HashingSink.hmacSha1(Sink sink,
ByteString key)
Returns a sink that uses the obsolete SHA-1 HMAC algorithm to produce 160-bit hashes.
|
static HashingSink |
HashingSink.hmacSha256(Sink sink,
ByteString key)
Returns a sink that uses the SHA-256 HMAC algorithm to produce 256-bit hashes.
|
static HashingSink |
HashingSink.hmacSha512(Sink sink,
ByteString key)
Returns a sink that uses the SHA-512 HMAC algorithm to produce 512-bit hashes.
|
static HashingSink |
HashingSink.md5(Sink sink)
Returns a sink that uses the obsolete MD5 hash algorithm to produce 128-bit hashes.
|
long |
BufferedSource.readAll(Sink sink)
Removes all bytes from this and appends them to
sink. |
long |
Buffer.readAll(Sink sink) |
static HashingSink |
HashingSink.sha1(Sink sink)
Returns a sink that uses the obsolete SHA-1 hash algorithm to produce 160-bit hashes.
|
static HashingSink |
HashingSink.sha256(Sink sink)
Returns a sink that uses the SHA-256 hash algorithm to produce 256-bit hashes.
|
static HashingSink |
HashingSink.sha512(Sink sink)
Returns a sink that uses the SHA-512 hash algorithm to produce 512-bit hashes.
|
Sink |
AsyncTimeout.sink(Sink sink)
Returns a new sink that delegates to
sink, using this to implement timeouts. |
| 构造器和说明 |
|---|
DeflaterSink(Sink sink,
Deflater deflater) |
ForwardingSink(Sink delegate) |
GzipSink(Sink sink) |
Copyright © 2025. All rights reserved.