Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 66 for toInt (0.2 sec)

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

      ) {
        this.withLock {
          if (closed) throw IOException("closed")
          hpackWriter.writeHeaders(requestHeaders)
    
          val byteCount = hpackBuffer.size
          val length = minOf(maxFrameSize - 4L, byteCount).toInt()
          frameHeader(
            streamId = streamId,
            length = length + 4,
            type = TYPE_PUSH_PROMISE,
            flags = if (byteCount == length.toLong()) FLAG_END_HEADERS else 0,
          )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketWriter.kt

          b1 = b1 or B1_FLAG_MASK
        }
        when {
          dataSize <= PAYLOAD_BYTE_MAX -> {
            b1 = b1 or dataSize.toInt()
            sinkBuffer.writeByte(b1)
          }
          dataSize <= PAYLOAD_SHORT_MAX -> {
            b1 = b1 or PAYLOAD_SHORT
            sinkBuffer.writeByte(b1)
            sinkBuffer.writeShort(dataSize.toInt())
          }
          else -> {
            b1 = b1 or PAYLOAD_LONG
            sinkBuffer.writeByte(b1)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  3. 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)
  4. container-tests/build.gradle.kts

    plugins {
      kotlin("jvm")
    }
    
    val platform = System.getProperty("okhttp.platform", "jdk9")
    val testJavaVersion = System.getProperty("test.java.version", "21").toInt()
    
    tasks.withType<Test> {
      useJUnitPlatform()
      onlyIf("By default not in CI") {
        System.getenv("CI") == null
          || (project.hasProperty("containerTests") && project.property("containerTests").toString().toBoolean())
      }
    
      jvmArgs(
        "-Dokhttp.platform=$platform",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 17 14:46:34 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketProtocol.kt

              // Byte xor is experimental in Kotlin so we coerce bytes to int, xor them
              // and convert back to byte.
              val bufferInt: Int = buffer[i].toInt()
              val keyInt: Int = key[keyIndex].toInt()
              buffer[i] = (bufferInt xor keyInt).toByte()
    
              i++
              keyIndex++
            }
          }
        } while (cursor.next() != -1)
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  6. okhttp-testing-support/src/main/kotlin/okhttp3/testing/PlatformVersion.kt

     */
    package okhttp3.testing
    
    object PlatformVersion {
      val majorVersion: Int by lazy {
        when (val jvmSpecVersion = getJvmSpecVersion()) {
          "1.8" -> 8
          else -> jvmSpecVersion.toInt()
        }
      }
    
      fun getJvmSpecVersion(): String {
        return System.getProperty("java.specification.version", "unknown")
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 917 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/Cookie.kt

              hour == -1 && matcher.usePattern(TIME_PATTERN).matches() -> {
                hour = matcher.group(1).toInt()
                minute = matcher.group(2).toInt()
                second = matcher.group(3).toInt()
              }
              dayOfMonth == -1 && matcher.usePattern(DAY_OF_MONTH_PATTERN).matches() -> {
                dayOfMonth = matcher.group(1).toInt()
              }
              month == -1 && matcher.usePattern(MONTH_PATTERN).matches() -> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:12:05 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  9. buildSrc/src/main/kotlin/AlpnVersions.kt

      }
    
      val javaVersion = System.getProperty("java.version")
      val match = "1\\.8\\.0_(\\d+)(-.*)?".toRegex().find(javaVersion) ?: return null
    
      return alpnBootVersionForPatchVersion(match.groupValues.first().toInt())
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 07 16:05:34 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  10. analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/evaluate/FirCompileTimeConstantEvaluator.kt

    
                ConstantValueKind.IntegerLiteral -> {
                    val long = value as Long
                    if (Int.MIN_VALUE < long && long < Int.MAX_VALUE) KtConstantValue.KtIntConstantValue(long.toInt(), psi)
                    else KtConstantValue.KtLongConstantValue(long, psi)
                }
    
                ConstantValueKind.UnsignedIntegerLiteral -> {
                    val long = value as ULong
    Plain Text
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Wed Mar 20 14:53:27 GMT 2024
    - 16.5K bytes
    - Viewed (0)
Back to top