- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 3,137 for sink (0.04 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/http/ExchangeCodec.kt
*/ package okhttp3.internal.http import java.io.IOException import okhttp3.Headers import okhttp3.Request import okhttp3.Response import okhttp3.Route import okhttp3.internal.connection.RealCall import okio.Sink import okio.Source /** Encodes HTTP requests and decodes HTTP responses. */ interface ExchangeCodec { /** The connection or CONNECT tunnel that owns this codec. */ val carrier: Carrier
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/Progress.java
} private Source source(Source source) { return new ForwardingSource(source) { long totalBytesRead = 0L; @Override public long read(Buffer sink, long byteCount) throws IOException { long bytesRead = super.read(sink, byteCount); // read() returns the number of bytes read, or -1 if this source is exhausted. totalBytesRead += bytesRead != -1 ? bytesRead : 0;
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 12 03:31:36 UTC 2019 - 3.9K bytes - Viewed (0) -
android/guava/src/com/google/common/hash/AbstractByteHasher.java
import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.nio.ByteBuffer; import java.nio.ByteOrder; /** * Abstract {@link Hasher} that handles converting primitives to bytes using a scratch {@code * ByteBuffer} and streams all bytes to a sink to compute the hash. * * @author Colin Decker */ @ElementTypesAreNonnullByDefault abstract class AbstractByteHasher extends AbstractHasher {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jun 15 20:59:00 UTC 2022 - 3.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt
server.listener.assertClosing(1000, "Bye!") server.webSocket!!.finishReader() server.listener.assertClosed(1000, "Bye!") } @Test fun emptyCloseInitiatesShutdown() { server.sink.write("8800".decodeHex()).emit() // Close without code. client.processNextFrame() client.listener.assertClosing(1005, "") client.webSocket!!.finishReader()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 01:59:58 UTC 2024 - 18.5K bytes - Viewed (0) -
guava/src/com/google/common/hash/AbstractByteHasher.java
import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.nio.ByteBuffer; import java.nio.ByteOrder; /** * Abstract {@link Hasher} that handles converting primitives to bytes using a scratch {@code * ByteBuffer} and streams all bytes to a sink to compute the hash. * * @author Colin Decker */ @ElementTypesAreNonnullByDefault abstract class AbstractByteHasher extends AbstractHasher {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jun 15 20:59:00 UTC 2022 - 3.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ResponseBodyTest.kt
assertThat(body.bytes()).isEqualTo(text) } } abstract class ForwardingSource( val delegate: Source, ) : Source { override fun read( sink: Buffer, byteCount: Long, ): Long = delegate.read(sink, byteCount) override fun timeout() = delegate.timeout() override fun close() = delegate.close()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt
source: BufferedSource = socket.source().buffer(), sink: BufferedSink = socket.sink().buffer(), ) = apply { this.socket = socket this.connectionName = when { client -> "$okHttpName $peerName" else -> "MockWebServer $peerName" } this.source = source this.sink = sink } fun listener(listener: Listener) = apply {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 32.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/RequestBodyCompression.java
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat May 25 18:02:55 UTC 2019 - 3.8K bytes - Viewed (0) -
docs/recipes.md
val requestBody = object : RequestBody() { override fun contentType() = MEDIA_TYPE_MARKDOWN override fun writeTo(sink: BufferedSink) { sink.writeUtf8("Numbers\n") sink.writeUtf8("-------\n") for (i in 2..997) { sink.writeUtf8(String.format(" * $i = ${factor(i)}\n")) } } private fun factor(n: Int): String {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Feb 18 08:52:22 UTC 2022 - 40.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.5K bytes - Viewed (0)