- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 29 for readUTF8 (0.31 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/internal/cache2/RelayTest.kt
val source1 = relay.newSource()!!.buffer() val source2 = relay.newSource()!!.buffer() assertThat(source1.readUtf8(5)).isEqualTo("abcde") assertThat(source2.readUtf8(5)).isEqualTo("abcde") assertThat(source2.readUtf8(5)).isEqualTo("fghij") assertThat(source1.readUtf8(5)).isEqualTo("fghij") assertThat(source1.exhausted()).isTrue() assertThat(source2.exhausted()).isTrue() source1.close()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 8.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/cache2/FileOperatorTest.kt
operatorA.write(36, bufferA, 33) operatorB.read(0, bufferB, 9) assertThat(bufferB.readUtf8()).isEqualTo("Dodgson!\n") operatorA.read(9, bufferA, 27) assertThat(bufferA.readUtf8()).isEqualTo("You shouldn't use my name.\n") operatorB.read(36, bufferB, 33) assertThat(bufferB.readUtf8()).isEqualTo("Dodgson, we've got Dodgson here!\n") } @Test fun largeRead() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 5.8K bytes - Viewed (0) -
container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt
val connection = url.openConnection() as HttpURLConnection assertThat( connection.inputStream .source() .buffer() .readUtf8(), ).contains("Peter the person") } } @Test fun testUrlConnectionPlaintextProxied() { testRequest { val proxy = Proxy( Proxy.Type.HTTP,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 6.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ResponseBodyTest.kt
val body = "".decodeHex().toResponseBody(mediaType) val source = body.source() assertThat(source.exhausted()).isTrue() assertThat(source.readUtf8()).isEqualTo("") } @Test fun sourceClosesUnderlyingSource() { var closed = false val body: ResponseBody = object : ResponseBody() { override fun contentType(): MediaType? = null
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/idn/IdnaMappingTableTest.kt
val buffer = Buffer() for (codePoint in 0..0x10ffff) { val allowedByTable = table.map(codePoint, buffer) val tableMappedTo = buffer.readUtf8() val allowedByCompactTable = compactTable.map(codePoint, buffer) val compactTableMappedTo = buffer.readUtf8() assertThat(allowedByCompactTable).isEqualTo(allowedByTable) assertThat(compactTableMappedTo).isEqualTo(tableMappedTo) } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 8.9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CacheCorruptionTest.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 6K bytes - Viewed (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/RecordedRequest.kt
val handshake: Handshake? val requestUrl: HttpUrl? @get:JvmName("-deprecated_utf8Body") @Deprecated( message = "Use body.readUtf8()", replaceWith = ReplaceWith("body.readUtf8()"), level = DeprecationLevel.ERROR, ) val utf8Body: String get() = body.readUtf8() val tlsVersion: TlsVersion? get() = handshake?.tlsVersion internal constructor( requestLine: String,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.1K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/url/-Url.kt
alreadyEncoded = alreadyEncoded, strict = strict, plusIsSpace = plusIsSpace, unicodeAllowed = unicodeAllowed, charset = charset, ) return out.readUtf8() } i += Character.charCount(codePoint) } // Fast path: no characters in [pos..limit) required encoding. return substring(pos, limit) } internal fun Buffer.writePercentDecoded(
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 7.3K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/HttpHeaders.kt
if (i == -1L) return null // Unterminated quoted string. if (this[i] == '"'.code.toByte()) { result.write(this, i) // Consume '"'. readByte() return result.readUtf8() } if (size == i + 1L) return null // Dangling escape. result.write(this, i) // Consume '\'. readByte() result.write(this, 1L) // The escaped character. } } /**
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon May 05 16:01:00 UTC 2025 - 7.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/FormBodyTest.kt
body.writeTo(out) assertThat(out.readUtf8()).isEqualTo(expected) } @Test fun encodedPair() { val body = FormBody .Builder() .add("sim", "ple") .build() val expected = "sim=ple" assertThat(body.contentLength()).isEqualTo(expected.length.toLong()) val buffer = Buffer() body.writeTo(buffer) assertThat(buffer.readUtf8()).isEqualTo(expected) } @Test
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 7.9K bytes - Viewed (0)