Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 101 for require (0.18 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

      open fun getSelectedProtocol(sslSocket: SSLSocket): String? = null
    
      /** For MockWebServer. This returns the inbound SNI names. */
      @SuppressLint("NewApi")
      @IgnoreJRERequirement // This function is overridden to require API >= 24.
      open fun getHandshakeServerNames(sslSocket: SSLSocket): List<String> {
        val session = sslSocket.session as? ExtendedSSLSession ?: return listOf()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (1)
  2. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

        upstreamSize: Long,
        metadataSize: Long,
      ) {
        val header =
          Buffer().apply {
            write(prefix)
            writeLong(upstreamSize)
            writeLong(metadataSize)
            require(size == FILE_HEADER_SIZE)
          }
    
        val fileOperator = FileOperator(file!!.channel)
        fileOperator.write(0, header, FILE_HEADER_SIZE)
      }
    
      @Throws(IOException::class)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

      if (address[11] != 255.toByte()) return false
    
      return true
    }
    
    /** Encodes an IPv4 address in canonical form according to RFC 4001. */
    internal fun inet4AddressToAscii(address: ByteArray): String {
      require(address.size == 4)
      return Buffer()
        .writeDecimalLong((address[0] and 0xff).toLong())
        .writeByte('.'.code)
        .writeDecimalLong((address[1] and 0xff).toLong())
        .writeByte('.'.code)
    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)
  4. okhttp/src/main/kotlin/okhttp3/Cookie.kt

          // seconds are not supported by this syntax.
          require(year >= 1601)
          require(month != -1)
          require(dayOfMonth in 1..31)
          require(hour in 0..23)
          require(minute in 0..59)
          require(second in 0..59)
    
          GregorianCalendar(UTC).apply {
            isLenient = false
            set(Calendar.YEAR, year)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:12:05 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/CacheControl.kt

          apply {
            val maxAgeSeconds = maxAge.inWholeSeconds
            require(maxAgeSeconds >= 0) { "maxAge < 0: $maxAgeSeconds" }
            this.maxAgeSeconds = maxAgeSeconds.commonClampToInt()
          }
    
        fun maxStale(maxStale: Duration) =
          apply {
            val maxStaleSeconds = maxStale.inWholeSeconds
            require(maxStaleSeconds >= 0) { "maxStale < 0: $maxStaleSeconds" }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 10K bytes
    - Viewed (0)
  6. docs/changelogs/changelog_4x.md

     *  Fix: Retain binary-compatibility in `okhttp3.internal.HttpMethod`. Naughty third party SDKs
        import this and we want to ease upgrades for their users.
    
    
    ## Version 4.0.0-RC2
    
    _2019-06-21_
    
     *  New: Require Kotlin 1.3.40.
     *  New: Change the Kotlin API from `File.toRequestBody()` to `File.asRequestBody()` and
        `BufferedSource.toResponseBody()` to `BufferedSource.asResponseBody()`. If the returned value
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/MultipartBody.kt

          @JvmStatic
          fun create(
            headers: Headers?,
            body: RequestBody,
          ): Part {
            require(headers?.get("Content-Type") == null) { "Unexpected header: Content-Type" }
            require(headers?.get("Content-Length") == null) { "Unexpected header: Content-Length" }
            return Part(headers, body)
          }
    
          @JvmStatic
          fun createFormData(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt

        flags: Int,
      ) {
        if (type != TYPE_WINDOW_UPDATE && logger.isLoggable(FINE)) {
          logger.fine(frameLog(false, streamId, length, type, flags))
        }
        require(length <= maxFrameSize) { "FRAME_SIZE_ERROR length > $maxFrameSize: $length" }
        require(streamId and 0x80000000.toInt() == 0) { "reserved bit set: $streamId" }
        sink.writeMedium(length)
        sink.writeByte(type and 0xff)
        sink.writeByte(flags and 0xff)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

      ) : SerialTask {
        override fun start() {
          taskRunner.assertThreadHoldsLock()
          require(currentTask == this)
          activeThreads++
    
          tasksExecutor.execute {
            taskRunner.assertThreadDoesntHoldLock()
            require(currentTask == this)
            try {
              runnable.run()
              require(currentTask == this) { "unexpected current task: $currentTask" }
            } finally {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

      val millis = unit.toMillis(duration)
      require(millis <= Integer.MAX_VALUE) { "$name too large" }
      require(millis != 0L || duration <= 0L) { "$name too small" }
      return millis.toInt()
    }
    
    internal fun checkDuration(
      name: String,
      duration: Duration,
    ): Int {
      check(!duration.isNegative()) { "$name < 0" }
      val millis = duration.inWholeMilliseconds
      require(millis <= Integer.MAX_VALUE) { "$name too large" }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
Back to top