- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 37 for readByteString (0.09 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/MessageDeflaterInflaterTest.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PrintEventsNonConcurrent.java
// Consume and discard the response body. response.body().source().readByteString(); } System.out.println("REQUEST 2 (pooled connection)"); try (Response response = client.newCall(request).execute()) { // Consume and discard the response body. response.body().source().readByteString(); } } public static void main(String... args) throws Exception {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Feb 16 23:20:49 UTC 2020 - 5.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/cache2/FileOperatorTest.kt
write(data) val operator = FileOperator( randomAccessFile!!.getChannel(), ) val buffer = Buffer() operator.read(0, buffer, data.size.toLong()) assertThat(buffer.readByteString()).isEqualTo(data) } @Test fun largeWrite() { val data = randomByteString(1000000) val operator = FileOperator( randomAccessFile!!.getChannel(), )
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 5.8K bytes - Viewed (0) -
docs/features/events.md
// Consume and discard the response body. response.body().source().readByteString(); } System.out.println("REQUEST 2 (pooled connection)"); try (Response response = client.newCall(request).execute()) { // Consume and discard the response body. response.body().source().readByteString(); } ``` And the listener prints the corresponding events: ``` REQUEST 1 (new connection)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 7.7K bytes - Viewed (0) -
okhttp-zstd/src/test/java/okhttp3/zstd/ZstdInterceptorTest.kt
result.zstdCompress().buffer().use { it.write(this@zstdCompress) } return result.readByteString() } private fun ByteString.gzipCompress(): ByteString { val result = Buffer() (result as Sink).gzip().buffer().use { it.write(this@gzipCompress) } return result.readByteString() } private fun response( url: String, body: ByteString,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Aug 01 06:04:22 UTC 2025 - 4.8K bytes - Viewed (1) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/MultipartReader.kt
.writeUtf8("--") .writeUtf8(boundary) .readByteString() /** * This delimiter typically precedes all subsequent parts. It may also precede the first part * if the body contains a preamble. */ private val crlfDashDashBoundary = Buffer() .writeUtf8("\r\n--") .writeUtf8(boundary) .readByteString() private var partCount = 0 private var closed = false
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed May 28 02:11:14 UTC 2025 - 7.3K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseResponseInterceptor.kt
sink: Buffer, byteCount: Long, ): Long { val buffer = Buffer() val read = delegate.read(buffer, byteCount) if (read != -1L) { sink.write(buffer.readByteString().toAsciiUppercase()) } return read } } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.8K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseRequestInterceptor.kt
object : ForwardingSink(sink) { @Throws(IOException::class) override fun write( source: Buffer, byteCount: Long, ) { val bytes = source.readByteString(byteCount) delegate.write( Buffer() .write(bytes.toAsciiUppercase()), byteCount, ) } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HuffmanTest.kt
assertThat(encodedLength(data).toLong()).isEqualTo(encodeBuffer.size) val decodeBuffer = Buffer() decode(encodeBuffer, encodeBuffer.size, decodeBuffer) assertEquals(data, decodeBuffer.readByteString()) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 1.8K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache2/Relay.kt
val fileOperator = FileOperator(randomAccessFile.channel) // Read the header. val header = Buffer() fileOperator.read(0, header, FILE_HEADER_SIZE) val prefix = header.readByteString(PREFIX_CLEAN.size.toLong()) if (prefix != PREFIX_CLEAN) throw IOException("unreadable cache file") val upstreamSize = header.readLong() val metadataSize = header.readLong()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed May 28 17:15:47 UTC 2025 - 11.8K bytes - Viewed (0)