Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 64 for readUtf8 (0.3 sec)

  1. okhttp/src/test/java/okhttp3/internal/idn/IdnaMappingTableTest.kt

        val buffer = Buffer()
        for (codePoint in 0..0x10ffff) {
          val allowedByTable = table.map(codePoint, buffer)
          val tableMappedTo = buffer.readUtf8()
    
          val allowedByCompactTable = compactTable.map(codePoint, buffer)
          val compactTableMappedTo = buffer.readUtf8()
    
          assertThat(allowedByCompactTable).isEqualTo(allowedByTable)
          assertThat(compactTableMappedTo).isEqualTo(tableMappedTo)
        }
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

      }
    
      // 2. Normalize, from bufferB to bufferA.
      val normalized = normalizeNfc(bufferB.readUtf8())
      bufferA.writeUtf8(normalized)
    
      // 3. For each label, convert/validate Punycode.
      val decoded = Punycode.decode(bufferA.readUtf8()) ?: return null
    
      // 4.1 Validate.
    
      // Must be NFC.
      if (decoded != normalizeNfc(decoded)) return null
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  3. 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) {
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/TestUtilCommon.kt

      get() = getEnv("OKHTTP_ROOT")!!.toPath()
    
    fun String(vararg codePoints: Int): String {
      val buffer = Buffer()
      for (codePoint in codePoints) {
        buffer.writeUtf8CodePoint(codePoint)
      }
      return buffer.readUtf8()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 931 bytes
    - Viewed (0)
  5. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/MappingTables.kt

              rangesBuffer.writeByte(b2)
              rangesBuffer.writeByte(b3)
            }
          }
        }
      }
    
      return IdnaMappingTableData(
        sections = sectionIndexBuffer.readUtf8(),
        ranges = rangesBuffer.readUtf8(),
        mappings = mappingsBuffer.toString(),
      )
    }
    
    /**
     * If [mapping] qualifies to be encoded as [MappedRange.InlineDelta] return new instance, otherwise null.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  6. okhttp/src/test/java/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() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  7. 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.
      }
    }
    
    /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K 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 {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 6K bytes
    - Viewed (1)
  9. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        assertThat(recordedRequest1.method).isEqualTo("POST")
        assertThat(recordedRequest1.body.readUtf8()).isEqualTo(body)
        assertThat(recordedRequest1.headers["Authorization"]).isNull()
        val recordedRequest2 = server.takeRequest()
        assertThat(recordedRequest2.method).isEqualTo("POST")
        assertThat(recordedRequest2.body.readUtf8()).isEqualTo(body)
        assertThat(recordedRequest2.headers["Authorization"]).isEqualTo(credential)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  10. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

        }
        return result.readUtf8()
      }
    
      fun readRelativeObjectIdentifier(): String {
        val result = Buffer()
        val dot = '.'.code.toByte().toInt()
        while (byteCount < limit) {
          if (result.size > 0) {
            result.writeByte(dot)
          }
          result.writeDecimalLong(readVariableLengthLong())
        }
        return result.readUtf8()
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
Back to top