- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 58 for readUtf8 (0.27 sec)
-
mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/MockStreamHandler.kt
private val results = LinkedBlockingQueue<FutureTask<Void>>() fun receiveRequest(expected: String) = apply { actions += { stream -> val actual = stream.requestBody.readUtf8(expected.utf8Size()) if (actual != expected) throw AssertionError("$actual != $expected") } } fun exhaustRequest() = apply { actions += { stream ->
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.2K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/FileUtil.java
* @return 読み込んだテキスト */ public static String readUTF8(final String path) { assertArgumentNotEmpty("path", path); return readText(path, UTF8); } /** * UTF8でファイルからテキストを読み込みます。 * * @param file * ファイル。{@literal null}であってはいけません * @return 読み込んだテキスト */ public static String readUTF8(final File file) { assertArgumentNotNull("file", file);
Java - Registered: Fri May 03 20:58:11 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/WebPlatformToAsciiData.kt
val path = okHttpRoot / "okhttp/src/test/resources/web-platform-test-toascii.json" return SYSTEM_FILE_SYSTEM.read(path) { Json.decodeFromString<List<WebPlatformToAsciiData>>(readUtf8()) } } }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Dec 20 23:27:07 GMT 2023 - 1.4K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostPath.kt
if (!response.isSuccessful) throw IOException("Unexpected code $response") fileSystem.sink(path).use { response.body.source().readAll(it) } println(fileSystem.source(path).buffer().readUtf8()) } } companion object { val MEDIA_TYPE_JSON = "application/json".toMediaType() } } fun main() { PostPath().run()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/idn/Punycode.kt
return null } if (dot < limit) { result.writeByte('.'.code) pos = dot + 1 } else { break } } return result.readUtf8() } private fun encodeLabel( string: String, pos: Int, limit: Int, result: Buffer, ): Boolean { if (!string.requiresEncode(pos, limit)) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 03 03:04:50 GMT 2024 - 8.5K bytes - Viewed (0) -
src/test/java/org/codelibs/core/io/FileUtilTest.java
assertThat(bytes, is("あいうえお".getBytes("UTF-8"))); } /** * @throws Exception */ @Test public void testReadUTF8() throws Exception { assertThat(FileUtil.readUTF8(getPath("hoge_utf8.txt")), is("あ")); } private String getPath(final String fileName) { return getClass().getName().replace('.', '/').replaceFirst(getClass().getSimpleName(), fileName); }
Java - Registered: Fri May 03 20:58:11 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 1.6K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt
assertThat(headersToList(builder)).containsExactly("Content-Length: 3") val response = builder.build() val body = Buffer() response.body!!.writeTo(body) assertThat(body.readUtf8()).isEqualTo("ABC") } @Test fun mockResponseAddHeader() { val builder = MockResponse.Builder() .clearHeaders() .addHeader("Cookie: s=square")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 23.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/InterceptorTest.kt
.get() .build() client.newCall(request).execute() val recordedRequest = server.takeRequest() assertThat(recordedRequest.method).isEqualTo("POST") assertThat(recordedRequest.body.readUtf8()).isEqualTo("abc") } @Test fun applicationInterceptorsRewriteRequestToServer() { rewriteRequestToServer(false) } @Test fun networkInterceptorsRewriteRequestToServer() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Jan 14 10:20:09 GMT 2024 - 27.8K bytes - Viewed (0) -
samples/tlssurvey/src/main/kotlin/okhttp3/survey/Clients.kt
ianaSuites.fromJavaName(it.javaName) }, ) } fun historicOkHttp(version: String): Client { val enabled = FileSystem.RESOURCES.read("okhttp_$version.txt".toPath()) { this.readUtf8().lines().filter { it.isNotBlank() }.map { SuiteId(id = null, name = it.trim()) } } return Client( userAgent = "OkHttp", version = version, enabled = enabled, ) }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Apr 02 01:44:15 GMT 2024 - 2.5K bytes - Viewed (0) -
okhttp/src/main/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(
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Tue Jan 09 12:33:05 GMT 2024 - 7.3K bytes - Viewed (0)