Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 88 for max (0.16 sec)

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

        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.
              delta++
            } else if (c == n) {
    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/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt

    import okhttp3.internal.format
    import okhttp3.internal.ws.WebSocketProtocol.OPCODE_BINARY
    import okhttp3.internal.ws.WebSocketProtocol.OPCODE_TEXT
    import okhttp3.internal.ws.WebSocketProtocol.PAYLOAD_BYTE_MAX
    import okhttp3.internal.ws.WebSocketProtocol.PAYLOAD_SHORT_MAX
    import okio.Buffer
    import okio.ByteString
    import okio.ByteString.Companion.EMPTY
    import okio.ByteString.Companion.decodeHex
    import okio.ByteString.Companion.encodeUtf8
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        assertThat(readAscii(gunzippedIn, Int.MAX_VALUE)).isEqualTo("one (gzipped)")
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
        val response2 =
          getResponse(
            Request.Builder()
              .url(server.url("/"))
              .build(),
          )
        assertThat(readAscii(response2.body.byteStream(), Int.MAX_VALUE)).isEqualTo("two (identity)")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  4. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

        assertThat(Adapters.INTEGER_AS_LONG.fromDer(bytes)).isEqualTo(-256L)
      }
    
      @Test fun `max long`() {
        val bytes = "02087fffffffffffffff".decodeHex()
        assertThat(Adapters.INTEGER_AS_LONG.fromDer(bytes)).isEqualTo(Long.MAX_VALUE)
        assertThat(Adapters.INTEGER_AS_LONG.toDer(Long.MAX_VALUE)).isEqualTo(bytes)
      }
    
      @Test fun `min long`() {
        val bytes = "02088000000000000000".decodeHex()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  5. okhttp-brotli/src/main/kotlin/okhttp3/brotli/internal/DecompressionBombChecker.kt

              if (outputByteCount > inputByteCount * maxRatio) {
                throw IOException(
                  "decompression bomb? outputByteCount=$outputByteCount, " +
                    "inputByteCount=$inputByteCount exceeds max ratio of $maxRatio",
                )
              }
            }
    
            return result
          }
        }
      }
    Plain Text
    - Registered: Fri Mar 29 11:42:11 GMT 2024
    - Last Modified: Mon Jan 29 22:50:20 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  6. samples/tlssurvey/src/main/kotlin/okhttp3/survey/CipherSuiteSurvey.kt

        }
        println()
        val sortedSuites =
          ianaSuites.suites.sortedBy { ianaSuite ->
            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) }
    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)
  7. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/MappedRange.kt

            }
    
        val b2: Int
          get() = absoluteDelta shr 7 and 0x7f
    
        val b3: Int
          get() = absoluteDelta and 0x7f
    
        companion object {
          const val MAX_VALUE = 0x3FFFF
        }
      }
    
      data class External(
        override val rangeStart: Int,
        val mappedTo: ByteString,
      ) : MappedRange
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt

        val body: ResponseBody =
          object : ResponseBody() {
            override fun contentType(): MediaType? {
              return null
            }
    
            override fun contentLength(): Long {
              return Int.MAX_VALUE + 1L
            }
    
            override fun source(): BufferedSource {
              throw AssertionError()
            }
          }
        assertFailsWith<IOException> {
          body.bytes()
        }.also { expected ->
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  9. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

            } else if (bodyIsStreaming(response)) {
              logger.log("<-- END HTTP (streaming)")
            } else {
              val source = responseBody.source()
              source.request(Long.MAX_VALUE) // Buffer the entire body.
    
              val totalMs = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNs)
    
              var buffer = source.buffer
    
              var gzippedLength: Long? = null
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  10. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

              upstreamBuffer.clone(),
              upstreamBytesRead,
            )
    
            synchronized(this@Relay) {
              // Append new upstream bytes into the buffer. Trim it to its max size.
              buffer.write(upstreamBuffer, upstreamBytesRead)
              if (buffer.size > bufferMaxSize) {
                buffer.skip(buffer.size - bufferMaxSize)
              }
    
    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)
Back to top