Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 46 for toInt (0.14 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/http2/Huffman.kt

          addCode(i, CODES[i], CODE_BIT_COUNTS[i].toInt())
        }
      }
    
      @Throws(IOException::class)
      fun encode(
        source: ByteString,
        sink: BufferedSink,
      ) {
        var accumulator = 0L
        var accumulatorBitCount = 0
    
        for (i in 0 until source.size) {
          val symbol = source[i] and 0xff
          val code = CODES[symbol]
          val codeBitCount = CODE_BIT_COUNTS[symbol].toInt()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  2. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Certificate.kt

      val notAfter: Long,
    ) {
      // Avoid Long.hashCode(long) which isn't available on Android 5.
      override fun hashCode(): Int {
        var result = 0
        result = 31 * result + notBefore.toInt()
        result = 31 * result + notAfter.toInt()
        return result
      }
    }
    
    internal data class SubjectPublicKeyInfo(
      val algorithm: AlgorithmIdentifier,
      val subjectPublicKey: BitString,
    )
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  3. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/AnyValue.kt

      override fun hashCode(): Int {
        var result = 0
        result = 31 * result + tagClass
        result = 31 * result + tag.toInt()
        result = 31 * result + (if (constructed) 0 else 1)
        result = 31 * result + length.toInt()
        result = 31 * result + bytes.hashCode()
        return result
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  4. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/SimpleIdnaMappingTable.kt

              mappedTo.writeUtf8CodePoint(readHexadecimalUnsignedLong().toInt())
            }
          }
    
          TYPE_DISALLOWED, TYPE_DISALLOWED_STD3_VALID, TYPE_IGNORED, TYPE_VALID -> Unit
    
          else -> throw IOException("unexpected type")
        }
    
        skipRestOfLine()
    
        result +=
          Mapping(
            sourceCodePoint0.toInt(),
            sourceCodePoint1.toInt(),
            type,
            mappedTo.readByteString(),
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  5. mockwebserver/src/main/kotlin/mockwebserver3/internal/SleepNanos.kt

     *
     */
    package mockwebserver3.internal
    
    internal fun sleepNanos(nanos: Long) {
      val ms = nanos / 1_000_000L
      val ns = nanos - (ms * 1_000_000L)
      if (ms > 0L || nanos > 0) {
        Thread.sleep(ms, ns.toInt())
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 07 16:05:34 GMT 2024
    - 811 bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

            } else {
              end = outBytes.size.toLong()
              truncated = nextOutFrame.truncated
            }
    
            // Write a frame.
            val length = (end - start).toInt()
            outputStream.write(outBytes, start.toInt(), length)
    
            // If the last frame was truncated, immediately close the connection.
            if (truncated) {
              socket.close()
            }
          } else {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/FakeDns.kt

        val from = nextAddress
        nextAddress += count
        return (from until nextAddress)
          .map {
            return@map InetAddress.getByAddress(
              Buffer().writeInt(it.toInt()).readByteArray(),
            )
          }
      }
    
      /** Allocates and returns `count` fake IPv6 addresses like [::ff00:64, ::ff00:65].  */
      fun allocateIpv6(count: Int): List<InetAddress> {
        val from = nextAddress
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

      var longestRunOffset = -1
      var longestRunLength = 0
      run {
        var i = 0
        while (i < address.size) {
          val currentRunOffset = i
          while (i < 16 && address[i].toInt() == 0 && address[i + 1].toInt() == 0) {
            i += 2
          }
          val currentRunLength = i - currentRunOffset
          if (currentRunLength > longestRunLength && currentRunLength >= 4) {
            longestRunOffset = currentRunOffset
    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)
  9. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

        val flags = buf.readShort().toInt() and 0xffff
        require(flags shr 15 != 0) { "not a response" }
    
        val responseCode = flags and 0xf
    
        if (responseCode == NXDOMAIN) {
          throw UnknownHostException("$hostname: NXDOMAIN")
        } else if (responseCode == SERVFAIL) {
          throw UnknownHostException("$hostname: SERVFAIL")
        }
    
        val questionCount = buf.readShort().toInt() and 0xffff
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  10. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

        if (byteCount == limit) return END_OF_DATA
    
        // We've exhausted the source stream.
        if (limit == -1L && source.exhausted()) return END_OF_DATA
    
        // Read the tag.
        val tagAndClass = source.readByte().toInt() and 0xff
        val tagClass = tagAndClass and 0b1100_0000
        val constructed = (tagAndClass and 0b0010_0000) == 0b0010_0000
        val tag =
          when (val tag0 = tagAndClass and 0b0001_1111) {
    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