- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for readByteString (0.11 sec)
-
okhttp/src/commonTest/kotlin/okhttp3/internal/publicsuffix/ConfiguredPublicSuffixDatabaseTest.kt
Buffer() .writeUtf8("*.jp\n") .writeUtf8("*.square.jp\n") .writeUtf8("example.com\n") .writeUtf8("square.com\n") .readByteString() list.exceptionBytes = Buffer() .writeUtf8("my.square.jp\n") .readByteString() assertThat(publicSuffixDatabase.getEffectiveTldPlusOne("my.square.jp")) .isEqualTo("my.square.jp")
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.7K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketWriterTest.kt
*/ @RegisterExtension val noDataLeftBehind = AfterEachCallback { context: ExtensionContext -> if (context.executionException.isPresent) return@AfterEachCallback assertThat(data.readByteString().hex(), "Data not empty") .isEqualTo("") } // Mutually exclusive. Use the one corresponding to the peer whose behavior you wish to test. private val serverWriter = WebSocketWriter(Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 9.3K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/MessageDeflaterInflaterTest.kt
inflater.inflate(buffer) assertThat(buffer.readByteString()).isEqualTo(message1) DeflaterSink(buffer, Deflater(Deflater.DEFAULT_COMPRESSION, true)).use { sink -> sink.write(Buffer().write(message2), message2.size.toLong()) } buffer.writeByte(0x00) inflater.inflate(buffer) assertThat(buffer.readByteString()).isEqualTo(message2) }
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sun Sep 21 06:26:07 UTC 2025 - 6.4K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt
nameBuf.writeUtf8(label) } nameBuf.writeByte(0) // end nameBuf.copyTo(this, 0, nameBuf.size) writeShort(type) writeShort(1) // CLASS_IN }.readByteString() @Throws(Exception::class) fun decodeAnswers( hostname: String, byteString: ByteString, ): List<InetAddress> { val result = mutableListOf<InetAddress>() val buf = Buffer()
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.9K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/publicsuffix/BasePublicSuffixList.kt
listSource().buffer().use { bufferedSource -> val totalBytes = bufferedSource.readInt() publicSuffixListBytes = bufferedSource.readByteString(totalBytes.toLong()) val totalExceptionBytes = bufferedSource.readInt() publicSuffixExceptionListBytes = bufferedSource.readByteString(totalExceptionBytes.toLong()) } synchronized(this) { this.bytes = publicSuffixListBytes!!
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Mon Jul 28 07:33:49 UTC 2025 - 3.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PrintEvents.java
@Override public void onResponse(Call call, Response response) throws IOException { try (ResponseBody body = response.body()) { // Consume and discard the response body. body.source().readByteString(); } } }); Request newYorkTimesRequest = new Request.Builder() .url("https://www.nytimes.com/") .build(); client.newCall(newYorkTimesRequest).enqueue(new Callback() {Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sun Feb 16 23:20:49 UTC 2020 - 6.1K 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 Dec 26 11:42:13 UTC 2025 - Last Modified: Sun Feb 16 23:20:49 UTC 2020 - 5.3K 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 Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Aug 01 06:04:22 UTC 2025 - 4.8K bytes - Viewed (1) -
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 Dec 26 11:42:13 UTC 2025 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 7.7K 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 Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 1.8K bytes - Viewed (0)