Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 63 for indexOf (0.17 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/idn/Punycode.kt

       * limits.
       */
      fun encode(string: String): String? {
        var pos = 0
        val limit = string.length
        val result = Buffer()
    
        while (pos < limit) {
          var dot = string.indexOf('.', startIndex = pos)
          if (dot == -1) dot = limit
    
          if (!encodeLabel(string, pos, dot, result)) {
            // If we couldn't encode the label, give up.
            return null
          }
    
    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)
  2. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

     * label is longer than 63 characters. Trailing dots are okay.
     */
    internal fun String.containsInvalidLabelLengths(): Boolean {
      if (length !in 1..253) return true
    
      var labelStart = 0
      while (true) {
        val dot = indexOf('.', startIndex = labelStart)
        val labelLength =
          when (dot) {
            -1 -> length - labelStart
            else -> dot - labelStart
          }
        if (labelLength !in 1..63) return true
        if (dot == -1) break
    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)
  3. okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixListGenerator.kt

          """Wildcard Assertion Failure: '$rule'
    A wildcard rule was added with a wildcard that is not in leftmost position! We'll need to change the ${PublicSuffixDatabase::class.java.name} to handle this."""
        }
        check(rule.indexOf(WILDCARD_CHAR, 1) == -1) {
          """Wildcard Assertion Failure: '$rule'
    A wildcard rule was added with multiple wildcards! We'll need to change ${PublicSuffixDatabase::class.java.name} to handle this."""
        }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 18 01:24:38 GMT 2024
    - 6K bytes
    - Viewed (0)
  4. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt

        sink: BufferedSink,
      ): Boolean {
        val index =
          mappings.binarySearch {
            when {
              it.sourceCodePoint1 < codePoint -> -1
              it.sourceCodePoint0 > codePoint -> 1
              else -> 0
            }
          }
    
        // Code points must be in 0..0x10ffff.
        require(index in mappings.indices) { "unexpected code point: $codePoint" }
    
        val mapping = mappings[index]
        var result = true
    
    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)
  5. okhttp/src/test/java/okhttp3/UrlComponentEncodingTesterJvm.kt

        val uriStripped = uriStrippedCodePoints.indexOf(codePointString) != -1
        if (uriStripped) {
          if (uri.toString() != component.urlString("")) {
            fail("Encoding $component $codePoint using $encoding")
          }
          return
        }
    
        // If the URI has more escaping than the HttpURL, check that the decoded values still match.
        val uriEscaped = uriEscapedCodePoints.indexOf(codePointString) != -1
        if (uriEscaped) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/OkHttpClientTest.kt

            override fun get(index: Int) = Protocol.HTTP_1_1
    
            override fun contains(element: Protocol?): Boolean {
              if (element == null) throw NullPointerException()
              return super.contains(element)
            }
    
            override fun indexOf(element: Protocol?): Int {
              if (element == null) throw NullPointerException()
              return super.indexOf(element)
            }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  7. samples/tlssurvey/src/main/kotlin/okhttp3/survey/CipherSuiteSurvey.kt

            val index = orderBy.indexOfFirst { it.matches(ianaSuite) }
            if (index == -1) Integer.MAX_VALUE else index
          }
        for (suiteId in sortedSuites) {
          print(suiteId.name)
          for (client in clients) {
            print("\t")
            val index = client.enabled.indexOfFirst { it.matches(suiteId) }
            if (index != -1) {
              print(index + 1)
            }
          }
          println()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Apr 02 01:44:15 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/FakeDns.kt

      fun clear(hostname: String): FakeDns {
        hostAddresses.remove(hostname)
        return this
      }
    
      @Throws(UnknownHostException::class)
      fun lookup(
        hostname: String,
        index: Int,
      ): InetAddress {
        return hostAddresses[hostname]!![index]
      }
    
      @Throws(UnknownHostException::class)
      override fun lookup(hostname: String): List<InetAddress> {
        requestedHosts.add(hostname)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

        val connection = this.connection!!
        connection.lock.assertHeld()
    
        val calls = connection.calls
        val index = calls.indexOfFirst { it.get() == this@RealCall }
        check(index != -1)
    
        calls.removeAt(index)
        this.connection = null
    
        if (calls.isEmpty()) {
          connection.idleAtNs = System.nanoTime()
          if (connectionPool.connectionBecameIdle(connection)) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  10. deploy_website.sh

    # Generate the API docs
    ./gradlew dokkaHtmlMultiModule
    
    mv ./build/dokka/htmlMultiModule docs/5.x
    
    # Copy in special files that GitHub wants in the project root.
    cat README.md | grep -v 'project website' > docs/index.md
    cp CHANGELOG.md docs/changelogs/changelog.md
    cp CONTRIBUTING.md docs/contribute/contributing.md
    
    # Build the site and push the new files up to GitHub
    python3 -m venv venv
    source venv/bin/activate
    Shell Script
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Nov 20 15:26:12 GMT 2023
    - 1.2K bytes
    - Viewed (0)
Back to top