Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for writeUtf8CodePoint (0.34 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/TestUtilCommon.kt

    import okio.Path.Companion.toPath
    
    val okHttpRoot: Path
      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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 931 bytes
    - Viewed (0)
  2. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

        setLevel(Level.BODY)
        val buffer = Buffer()
        buffer.writeUtf8CodePoint(0x89)
        buffer.writeUtf8CodePoint(0x50)
        buffer.writeUtf8CodePoint(0x4e)
        buffer.writeUtf8CodePoint(0x47)
        buffer.writeUtf8CodePoint(0x0d)
        buffer.writeUtf8CodePoint(0x0a)
        buffer.writeUtf8CodePoint(0x1a)
        buffer.writeUtf8CodePoint(0x0a)
        server.enqueue(
          MockResponse.Builder()
            .body(buffer)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 37.6K bytes
    - Viewed (0)
  3. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt

            sink.write(mapping.mappedTo)
          }
    
          TYPE_DEVIATION, TYPE_DISALLOWED_STD3_VALID, TYPE_VALID -> {
            sink.writeUtf8CodePoint(codePoint)
          }
    
          TYPE_DISALLOWED -> {
            sink.writeUtf8CodePoint(codePoint)
            result = false
          }
        }
    
        return result
      }
    }
    
    private val optionsDelimiter =
      Options.of(
        // 0.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/idn/IdnaMappingTable.kt

            sink.writeUtf8CodePoint(codePoint - codepointDelta)
          }
          in 80..95 -> {
            // Mapped inline as codePoint delta to add
            val b2 = ranges[rangesIndex + 2].code
            val b3 = ranges[rangesIndex + 3].code
    
            val codepointDelta = (b1 and 0xF shl 14) or (b2 shl 7) or b3
            sink.writeUtf8CodePoint(codePoint + codepointDelta)
          }
          119 -> {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Apr 02 11:39:58 GMT 2024
    - 9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/url/-Url.kt

          // Percent encode this character.
          if (encodedCharBuffer == null) {
            encodedCharBuffer = Buffer()
          }
    
          if (charset == null || charset == Charsets.UTF_8) {
            encodedCharBuffer.writeUtf8CodePoint(codePoint)
          } else {
            encodedCharBuffer.writeString(input, i, i + Character.charCount(codePoint), charset)
          }
    
          while (!encodedCharBuffer.exhausted()) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/idn/IdnStringprep.kt

        // 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
        // TODO.
    
        // 3 and 4. Check prohibited characters and bidi.
    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)
  7. okhttp/src/test/java/okhttp3/internal/idn/StringprepReader.kt

        if (select(optionsSemicolon) != 0) throw IOException("expected ';'")
        skipWhitespace()
        while (select(optionsSemicolon) == -1) {
          val targetCodePoint = readHexadecimalUnsignedLong().toInt()
          target.writeUtf8CodePoint(targetCodePoint)
          skipWhitespace()
        }
        skipRestOfLine()
        result[sourceCodePoint] = target.readUtf8()
      }
      return MappingListCodePointMapping(result)
    }
    
    Plain Text
    - Registered: Fri Mar 29 11:42:11 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  8. okhttp-idna-mapping-table/src/test/kotlin/okhttp3/internal/idn/MappingTablesTest.kt

          sourceCodePoint0 = sourceCodePoint0,
          sourceCodePoint1 = sourceCodePoint1,
          type = TYPE_MAPPED,
          mappedTo =
            Buffer().also {
              for (cp in mappedToCodePoints) {
                it.writeUtf8CodePoint(cp)
              }
            }.readByteString(),
        )
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/idn/Punycode.kt

          if (n > 0x10ffff) return false // Not a valid code point.
    
          codePoints.add(i, n)
    
          i++
        }
    
        for (codePoint in codePoints) {
          result.writeUtf8CodePoint(codePoint)
        }
    
        return true
      }
    
      /** Returns a new bias. */
      private fun adapt(
        delta: Int,
        numpoints: Int,
        first: Boolean,
      ): Int {
        var delta =
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 03 03:04:50 GMT 2024
    - 8.5K bytes
    - Viewed (0)
Back to top