Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 59 for readUtf8 (0.08 sec)

  1. okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 11 22:09:35 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/MultipartReaderTest.kt

            "abc",
          ),
        )
        assertThat(partAbc.body.readUtf8()).isEqualTo("abcd\r\nefgh")
    
        val partIjk = parts.nextPart()!!
        assertThat(partIjk.headers).isEqualTo(
          headersOf(
            "Content-Type",
            "text/plain; charset=utf-8",
            "Content-ID",
            "ijk",
          ),
        )
        assertThat(partIjk.body.readUtf8()).isEqualTo("ijkl\r\nmnop\r\n")
    
        assertThat(parts.nextPart()).isNull()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  3. 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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  4. okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/MultipartBodyTest.kt

        val buffer = Buffer()
        body.writeTo(buffer)
        assertThat(body.contentLength()).isEqualTo(buffer.size)
        assertThat(buffer.readUtf8()).isEqualTo(expected)
    
        val buffer2 = Buffer()
        body.writeTo(buffer2)
        assertThat(body.contentLength()).isEqualTo(buffer2.size)
        assertThat(buffer2.readUtf8()).isEqualTo(expected)
      }
    
      @Test
      fun writeTwiceWithOneShot() {
        val expected =
          """
          |--123
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/fess/util/UpgradeUtil.java

            final String filePath = indexConfigPath + "/" + indexName + "/" + path;
            try {
                final String source = FileUtil.readUTF8(filePath);
                try (CurlResponse response =
                        ComponentUtil.getCurlHelper().post("/_configsync/file").param("path", path).body(source).execute()) {
                    if (response.getHttpStatusCode() == 200) {
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  7. container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt

        testRequest {
          val url = URI(mockServer.endpoint + "/person?name=peter").toURL()
    
          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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Apr 05 03:30:42 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/CacheCorruptionTest.kt

        val metadataFile =
          fileSystem.allPaths.find {
            it.name.endsWith(".0")
          }
    
        if (metadataFile != null) {
          val contents =
            fileSystem.read(metadataFile) {
              readUtf8()
            }
    
          fileSystem.write(metadataFile) {
            writeUtf8(corruptor(contents))
          }
        }
      }
    
      private fun testCorruptingCache(corruptor: () -> Unit): Response {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 6K bytes
    - Viewed (0)
  9. okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  10. okhttp/src/main/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.2K bytes
    - Viewed (0)
Back to top