- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for readUTF8 (0.15 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) -
okhttp/src/jvmTest/kotlin/okhttp3/WholeOperationTimeoutTest.kt
val call = client.newCall(request) call.timeout().timeout(250, TimeUnit.MILLISECONDS) val response = call.execute() Thread.sleep(500) assertFailsWith<IOException> { response.body.source().readUtf8() }.also { expected -> assertThat(expected.message).isEqualTo("timeout") assertThat(call.isCanceled()).isTrue() } } @Test fun timeoutReadingResponseWithEnqueue() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Jun 18 12:28:21 UTC 2025 - 10.6K 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) -
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) -
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/jvmTest/kotlin/okhttp3/InterceptorTest.kt
private fun uppercase(original: BufferedSink): Sink = object : ForwardingSink(original) { 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()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 28.2K 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) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt
val response1 = call1.execute() val response2 = call2.execute() assertThat(response1.body.source().readUtf8(3)).isEqualTo("ABC") assertThat(response2.body.source().readUtf8(3)).isEqualTo("GHI") assertThat(response1.body.source().readUtf8(3)).isEqualTo("DEF") assertThat(response2.body.source().readUtf8(3)).isEqualTo("JKL") val c0e0 = server.takeRequest() assertThat(c0e0.connectionIndex).isEqualTo(0)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 73.4K 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)