Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for decrement (0.23 sec)

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

        var bias = INITIAL_BIAS
        var h = b
        while (h < input.size) {
          val m = input.minBy { if (it >= n) it else Int.MAX_VALUE }
    
          val increment = (m - n) * (h + 1)
          if (delta > Int.MAX_VALUE - increment) return false // Prevent overflow.
          delta += increment
    
          n = m
    
          for (c in input) {
            if (c < n) {
              if (delta == Int.MAX_VALUE) return false // Prevent overflow.
    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/cache2/Relay.kt

      /** The most recently read bytes from [upstream]. This is a suffix of [file]. Guarded by this. */
      val buffer = Buffer()
    
      /**
       * Reference count of the number of active sources reading this stream. When decremented to 0
       * resources are released and all following calls to [.newSource] return null. Guarded by this.
       */
      var sourceCount = 0
    
      val isClosed: Boolean
        get() = file == null
    
      @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/test/java/okhttp3/internal/cache2/RelayTest.kt

        val relay = edit(file, upstream, metadata, 1024)
        val source1 = relay.newSource()
        val source2 = relay.newSource()
        source1!!.close()
        source1.close() // Unnecessary. Shouldn't decrement the reference count.
        assertThat(relay.isClosed).isFalse()
        source2!!.close()
        assertThat(relay.isClosed).isTrue()
        assertFile(Relay.PREFIX_DIRTY, -1L, -1, null, null)
      }
    
      @Test
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Reader.kt

      private fun readWindowUpdate(
        handler: Handler,
        length: Int,
        flags: Int,
        streamId: Int,
      ) {
        val increment: Long
        try {
          if (length != 4) throw IOException("TYPE_WINDOW_UPDATE length !=4: $length")
          increment = source.readInt() and 0x7fffffffL
          if (increment == 0L) throw IOException("windowSizeIncrement was 0")
        } catch (e: Exception) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 19.9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

    ): Int {
      for (i in startIndex until endIndex) {
        when (this[i]) {
          '\t', '\n', '\u000C', '\r', ' ' -> Unit
          else -> return i
        }
      }
      return endIndex
    }
    
    /**
     * Decrements [endIndex] until `input[endIndex - 1]` is not ASCII whitespace. Stops at [startIndex].
     */
    internal fun String.indexOfLastNonAsciiWhitespace(
      startIndex: Int = 0,
      endIndex: Int = length,
    ): Int {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2.kt

          length,
          formattedType,
          formattedFlags,
        )
      }
    
      /**
       * Returns a human-readable representation of a `WINDOW_UPDATE` frame. This frame includes the
       * window size increment instead of flags.
       */
      fun frameLogWindowUpdate(
        inbound: Boolean,
        streamId: Int,
        length: Int,
        windowSizeIncrement: Long,
      ): String {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/Cache.kt

     * the response, the client will issue a conditional `GET`. The server will then send either
     * the updated response if it has changed, or a short 'not modified' response if the client's copy
     * is still valid. Such responses increment both the network count and hit count.
     *
     * The best way to improve the cache hit rate is by configuring the web server to return cacheable
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
Back to top