Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for readUtf8CodePoint (0.34 sec)

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

      internal operator fun invoke(input: BufferedSource): String? {
        // 1. Map.
        val mapResult = Buffer()
        while (!input.exhausted()) {
          val codePoint = input.readUtf8CodePoint()
          when (val mappedCodePoint = mapping[codePoint]) {
            null -> mapResult.writeUtf8CodePoint(codePoint)
            else -> mapResult.writeUtf8(mappedCodePoint)
          }
        }
    
        // 2. Normalize
    Plain Text
    - Registered: Fri Mar 29 11:42:11 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/WebPlatformUrlTestData.kt

          return buildString {
            val buffer = Buffer().writeUtf8(s)
            while (!buffer.exhausted()) {
              val c = buffer.readUtf8CodePoint()
              if (c != '\\'.code) {
                append(c.toChar())
                continue
              }
              when (buffer.readUtf8CodePoint()) {
                '\\'.code -> append('\\')
                '#'.code -> append('#')
                'n'.code -> append('\n')
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  3. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/internal/IsProbablyUtf8.kt

        val prefix = Buffer()
        val byteCount = size.coerceAtMost(64)
        copyTo(prefix, 0, byteCount)
        for (i in 0 until 16) {
          if (prefix.exhausted()) {
            break
          }
          val codePoint = prefix.readUtf8CodePoint()
          if (Character.isISOControl(codePoint) && !Character.isWhitespace(codePoint)) {
            return false
          }
        }
        return true
      } catch (_: EOFException) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Jan 07 16:05:34 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

    internal fun idnToAscii(host: String): String? {
      val bufferA = Buffer().writeUtf8(host)
      val bufferB = Buffer()
    
      // 1. Map, from bufferA to bufferB.
      while (!bufferA.exhausted()) {
        val codePoint = bufferA.readUtf8CodePoint()
        if (!IDNA_MAPPING_TABLE.map(codePoint, bufferB)) return null
      }
    
      // 2. Normalize, from bufferB to bufferA.
      val normalized = normalizeNfc(bufferB.readUtf8())
      bufferA.writeUtf8(normalized)
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
Back to top