- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 67 for writeUtf8 (0.05 sec)
-
okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt
vararg bodyLines: String, ) { filesystem.write(journalFile) { writeUtf8( """ |$magic |$version |$appVersion |$valueCount |$blank | """.trimMargin(), ) for (line in bodyLines) { writeUtf8(line) writeUtf8("\n") } } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 14:55:09 UTC 2024 - 75.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/InterceptorTest.kt
override fun write( source: Buffer, byteCount: Long, ) { original.writeUtf8(source.readUtf8(byteCount).uppercase()) } } } private fun gzip(data: String): Buffer { val result = Buffer() val sink = GzipSink(result).buffer() sink.writeUtf8(data) sink.close() return result } private fun addInterceptor( network: Boolean,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 27.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt
if (result.containsInvalidLabelLengths()) return null return result } internal fun idnToAscii(host: String): String? { val bufferA = Buffer().writeUtf8(host) val bufferB = Buffer() // 1. Map, from bufferA to bufferB. while (!bufferA.exhausted()) { val codePoint = bufferA.readUtf8CodePoint()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 11.2K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt
server.enqueue(MockResponse()) val body: RequestBody = object : RequestBody() { override fun contentType() = PLAIN override fun writeTo(sink: BufferedSink) { sink.writeUtf8("Hi!") } } val response = client.newCall(request().post(body).build()).execute() response.body.close() applicationLogs .assertLogEqual("--> POST $url")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 09:14:38 UTC 2024 - 37.6K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/ServerSentEventIteratorTest.kt
) { callbacks.add(Event(id, type, data)) } override fun onRetryChange(timeMs: Long) { callbacks.add(timeMs) } } val buffer = Buffer().writeUtf8(source) val reader = ServerSentEventReader(buffer, callback) while (reader.processNextEvent()) { } assertThat(buffer.size, "Unconsumed buffer: ${buffer.readUtf8()}") .isEqualTo(0) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 6.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/HttpHeaders.kt
fun Headers.parseChallenges(headerName: String): List<Challenge> { val result = mutableListOf<Challenge>() for (h in 0 until size) { if (headerName.equals(name(h), ignoreCase = true)) { val header = Buffer().writeUtf8(value(h)) try { header.readChallengeHeader(result) } catch (e: EOFException) { Platform.get().log("Unable to parse challenge", Platform.WARN, e) } } } return result }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CacheCorruptionTest.kt
} if (metadataFile != null) { val contents = fileSystem.read(metadataFile) { readUtf8() } fileSystem.write(metadataFile) { writeUtf8(corruptor(contents)) } } } private fun testCorruptingCache(corruptor: () -> Unit): Response { server.useHttps(handshakeCertificates.sslSocketFactory()) server.enqueue(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt
*/ fun concatLengthPrefixed(protocols: List<Protocol>): ByteArray { val result = Buffer() for (protocol in alpnProtocolNames(protocols)) { result.writeByte(protocol.length) result.writeUtf8(protocol) } return result.readByteArray() } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt
private object SlowRequestBody : RequestBody() { override fun contentType(): MediaType? = null override fun writeTo(sink: BufferedSink) { for (i in 0 until 50) { sink.writeUtf8("abc") sink.flush() Thread.sleep(100) } fail("") } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/idn/IdnaMappingTable.kt
in 0..63 -> { // Length of the UTF-16 sequence that this range maps to. The offset is b2b3. val beginIndex = ranges.read14BitInt(rangesIndex + 2) sink.writeUtf8(mappings, beginIndex, beginIndex + b1) } in 64..79 -> { // Mapped inline as codePoint delta to subtract val b2 = ranges[rangesIndex + 2].code val b3 = ranges[rangesIndex + 3].code
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Apr 02 11:39:58 UTC 2024 - 9K bytes - Viewed (0)