- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for readUtf8 (0.12 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/TrailersTest.kt
assertThat(source.readUtf8()).isEqualTo("Hello") assertThat(response.trailers()).isEqualTo(headersOf("t1", "v2")) } val call2 = client.newCall(Request(server.url("/"))) call2.execute().use { response -> val source = response.body.source() assertThat(response.header("h1")).isEqualTo("v1") assertThat(source.readUtf8()).isEqualTo("Hello")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 18:57:05 UTC 2025 - 18K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/FileUtil.java
* * @param path * The path. Must not be {@literal null} or empty. * @return The text read from the file. */ public static String readUTF8(final String path) { assertArgumentNotEmpty("path", path); return readText(path, UTF8); } /** * Reads text from a file in UTF-8 encoding. * * @param file
Registered: Fri Sep 05 20:58:11 UTC 2025 - Last Modified: Thu Jul 31 08:16:49 UTC 2025 - 8.8K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/WebSocketReader.kt
throw ProtocolException("Malformed close payload length of 1.") } else if (bufferSize != 0L) { code = controlFrameBuffer.readShort().toInt() reason = controlFrameBuffer.readUtf8() val codeExceptionMessage = WebSocketProtocol.closeCodeExceptionMessage(code) if (codeExceptionMessage != null) throw ProtocolException(codeExceptionMessage) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Jul 29 22:04:11 UTC 2025 - 9.9K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/MockSocketHandler.kt
private val results = LinkedBlockingQueue<FutureTask<Void>>() fun receiveRequest(expected: String) = apply { actions += { stream -> val actual = stream.source.readUtf8(expected.utf8Size()) if (actual != expected) throw AssertionError("$actual != $expected") } } fun exhaustRequest() = apply { actions += { stream ->
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 3.3K bytes - Viewed (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/internal/ServerSentEventReader.kt
id: String?, type: String?, data: Buffer, ) { if (data.size != 0L) { lastId = id data.skip(1L) // Leading newline. callback.onEvent(id, type, data.readUtf8()) } } companion object { private val options = Options.of( // 0 "\r\n".encodeUtf8(), // 1 "\r".encodeUtf8(), // 2
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:47:47 UTC 2025 - 4.3K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
} @Test fun setBodyAdjustsHeaders() { val response = MockResponse().setBody("ABC") assertThat(headersToList(response)).containsExactly("Content-Length: 3") assertThat(response.getBody()!!.readUtf8()).isEqualTo("ABC") } @Test fun mockResponseAddHeader() { val response = MockResponse() .clearHeaders() .addHeader("Cookie: s=square")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 03 13:16:34 UTC 2025 - 22.3K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/dict/DictionaryManager.java
try (CurlResponse response = ComponentUtil.getCurlHelper() .post("/_configsync/file") .param("path", dictFile.getPath()) .body(FileUtil.readUTF8(file)) .execute()) { final Map<String, Object> contentMap = response.getContent(OpenSearchCurl.jsonParser());
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Thu Aug 07 03:06:29 UTC 2025 - 7.7K bytes - Viewed (0) -
mockwebserver/README.md
assertEquals("POST /v1/chat/send HTTP/1.1", request.getRequestLine()); assertEquals("application/json; charset=utf-8", request.getHeaders().get("Content-Type")); assertEquals("{}", request.getBody().readUtf8()); ``` ### Kotlin ```kotlin val request = server.takeRequest() assertEquals("POST /v1/chat/send HTTP/1.1", request.requestLine)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jul 19 13:40:52 UTC 2025 - 8.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt
val response1 = client.newCall(request).execute() val in1 = response1.body.source() assertThat(in1.readUtf8("I love ".length.toLong())).isEqualTo("I love ") in1.skip("puppies but hate ".length.toLong()) assertThat(in1.readUtf8("spiders".length.toLong())).isEqualTo("spiders") assertThat(in1.exhausted()).isTrue() in1.close() assertThat(cache.writeSuccessCount()).isEqualTo(1)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 113.6K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RequestTest.kt
val requestBodyBytes = Buffer() .apply { request.body?.writeTo(this) } val decompressedRequestBody = GzipSource(requestBodyBytes).use { it.buffer().readUtf8() } assertThat(decompressedRequestBody).isEqualTo("This is the original message") } @Test fun cannotGzipWithoutABody() { assertFailsWith<IllegalStateException> { Request
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 19K bytes - Viewed (0)