Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 52 for readUTF8 (0.21 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/internal/cache/DiskLruCacheTest.kt

        index: Int,
      ) = cacheDir / "$key.$index.tmp"
    
      private fun readFile(file: Path): String =
        filesystem.read(file) {
          readUtf8()
        }
    
      private fun readFileOrNull(file: Path): String? =
        try {
          filesystem.read(file) {
            readUtf8()
          }
        } catch (_: FileNotFoundException) {
          null
        }
    
      fun writeFile(
        file: Path,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 75.7K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/UrlComponentEncodingTester.kt

            for (i in 0 until utf8.size) {
              percentEncoded
                .writeUtf8("%")
                .writeUtf8(ByteString.of(utf8[i]).hex().uppercase())
            }
            return percentEncoded.readUtf8()
          }
        },
    
        /** URLs that contain this character in this component are invalid.  */
        FORBIDDEN,
    
        /** Hostnames that contain this character are encoded with punycode.  */
        PUNYCODE,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

          derWriter.writeUtf8("a".repeat(201))
        }
    
        assertThat(buffer.readByteString(3)).isEqualTo("1e81c9".decodeHex())
        assertThat(buffer.readUtf8()).isEqualTo("a".repeat(201))
      }
    
      @Test fun `decode primitive bit string`() {
        val buffer =
          Buffer()
            .write("0307040A3B5F291CD0".decodeHex())
    
        val derReader = DerReader(buffer)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 31.7K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

        var chunkSizes: List<Int>? = recordedRequest.chunkSizes
        var bodySize: Long = recordedRequest.bodySize
        var body: Buffer = recordedRequest.body
        var utf8Body: String = recordedRequest.body.readUtf8()
        var sequenceNumber: Int = recordedRequest.sequenceNumber
        var tlsVersion: TlsVersion? = recordedRequest.tlsVersion
        var handshake: Handshake? = recordedRequest.handshake
      }
    
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/Http2ConnectionTest.kt

        connection.writePingAndAwaitPong()
        assertThat(stream.takeHeaders()).isEqualTo(headersOf("a", "android"))
        val source = stream.source.buffer()
        assertThat(source.readUtf8(5)).isEqualTo("robot")
        stream.sink.close()
        assertThat(connection.openStreamCount()).isEqualTo(0)
    
        // Verify the peer received what was expected.
        val synStream = peer.takeFrame()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 75.5K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

        assertThat(body1.readUtf8()).isEqualTo("abc")
        body1.timeout().deadline(5, TimeUnit.SECONDS)
    
        // Call 2: check for the absence of a deadline on the request body.
        val request2 = Request.Builder().url(server.url("/")).build()
        val response2 = client.newCall(request2).execute()
        val body2 = response2.body.source()
        assertThat(body2.readUtf8()).isEqualTo("def")
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 146.6K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/fess/opensearch/client/SearchEngineClient.java

                final String autoExpandReplicas) {
            final FessConfig fessConfig = ComponentUtil.getFessConfig();
            String source = FileUtil.readUTF8(indexConfigFile);
            String dictionaryPath = System.getProperty("fess.dictionary.path", StringUtil.EMPTY);
            if (StringUtil.isNotBlank(dictionaryPath) && !dictionaryPath.endsWith("/")) {
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Sun Aug 31 08:19:00 UTC 2025
    - 121.9K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/DuplexTest.kt

          )
        call.execute().use { response ->
          assertThat(response.headers)
            .isEqualTo(headersOf("h1", "v1", "h2", "v2"))
          val responseBody = response.body.source()
          assertThat(responseBody.readUtf8(2)).isEqualTo("ok")
          assertThat(responseBody.exhausted()).isTrue()
          assertThat(response.trailers()).isEqualTo(headersOf("trailers", "boom"))
        }
        body.awaitSuccess()
      }
    
      @Test
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 24.8K bytes
    - Viewed (0)
Back to top