Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for positive (0.23 sec)

  1. okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt

      @Test fun `boolean`() {
        val bytes = "0101FF".decodeHex()
        assertThat(Adapters.BOOLEAN.fromDer(bytes)).isEqualTo(true)
        assertThat(Adapters.BOOLEAN.toDer(true)).isEqualTo(bytes)
      }
    
      @Test fun `positive integer`() {
        val bytes = "020132".decodeHex()
        assertThat(Adapters.INTEGER_AS_LONG.toDer(50L)).isEqualTo(bytes)
        assertThat(Adapters.INTEGER_AS_LONG.fromDer(bytes)).isEqualTo(50L)
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 31.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/CacheCorruptionTest.kt

        corruptor()
    
        return client.newCall(request).execute()
      }
    
      /**
       * @param delta the offset from the current date to use. Negative values yield dates in the past;
       *     positive values yield dates in the future.
       */
      private fun formatDate(
        delta: Long,
        timeUnit: TimeUnit,
      ): String? {
        return formatDate(Date(System.currentTimeMillis() + timeUnit.toMillis(delta)))
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 6K bytes
    - Viewed (1)
  3. okhttp/src/main/kotlin/okhttp3/Cookie.kt

                c == ':'.code
            )
            if (dateCharacter == !invert) return i
          }
          return limit
        }
    
        /**
         * Returns the positive value if [s] is positive, or [Long.MIN_VALUE] if it is either 0 or
         * negative. If the value is positive but out of range, this returns [Long.MAX_VALUE].
         *
         * @throws NumberFormatException if [s] is not an integer of any precision.
         */
    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)
  4. okhttp/src/main/kotlin/okhttp3/internal/idn/IdnaMappingTable.kt

       * in (by dividing by 4) and out (by multiplying by 4).
       */
      private fun findRangesOffset(
        codePoint: Int,
        position: Int,
        limit: Int,
      ): Int {
        val target = codePoint and 0x7f
        val offset =
          binarySearch(
            position = position,
            limit = limit,
          ) { index ->
            val entryIndex = index * 4
            val b0 = ranges[entryIndex].code
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Apr 02 11:39:58 GMT 2024
    - 9K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixListGenerator.kt

       */
      private fun assertWildcardRule(rule: String) {
        check(rule.startsWith(WILDCARD_CHAR)) {
          """Wildcard Assertion Failure: '$rule'
    A wildcard rule was added with a wildcard that is not in leftmost position! We'll need to change the ${PublicSuffixDatabase::class.java.name} to handle this."""
        }
        check(rule.indexOf(WILDCARD_CHAR, 1) == -1) {
          """Wildcard Assertion Failure: '$rule'
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:24:38 GMT 2024
    - 6K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/OkHttpClientTest.kt

        assertFailsWith<IllegalArgumentException> {
          builder.minWebSocketMessageToCompress(-1024)
        }.also { expected ->
          assertThat(expected.message)
            .isEqualTo("minWebSocketMessageToCompress must be positive: -1024")
        }
      }
    
      companion object {
        private val DEFAULT_PROXY_SELECTOR = ProxySelector.getDefault()
        private val DEFAULT_COOKIE_HANDLER = CookieManager.getDefault()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

          origin: String,
          protocol: ByteString,
          host: String,
          port: Int,
          maxAge: Long,
        ) {
          // TODO: register alternate service.
        }
      }
    
      /** Even, positive numbered streams are pushed streams in HTTP/2. */
      internal fun pushedStream(streamId: Int): Boolean = streamId != 0 && streamId and 1 == 0
    
      internal fun pushRequestLater(
        streamId: Int,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

     *     first access and will be created if it does not exist.
     * @param directory a writable directory.
     * @param valueCount the number of values per cache entry. Must be positive.
     * @param maxSize the maximum number of bytes this cache should use to store.
     */
    class DiskLruCache(
      fileSystem: FileSystem,
      /** Returns the directory where this cache stores its data. */
      val directory: Path,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/http/DateFormatting.kt

            BROWSER_COMPATIBLE_DATE_FORMATS[i] = format
          }
          position.index = 0
          result = format.parse(this, position)
          if (position.index != 0) {
            // Something was parsed. It's possible the entire string was not consumed but we ignore
            // that. If any of the BROWSER_COMPATIBLE_DATE_FORMAT_STRINGS ended in "'GMT'" we'd have
            // to also check that position.getIndex() == value.length() otherwise parsing might have
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt

         *
         * 1024 by default.
         */
        fun minWebSocketMessageToCompress(bytes: Long) =
          apply {
            require(bytes >= 0) {
              "minWebSocketMessageToCompress must be positive: $bytes"
            }
    
            this.minWebSocketMessageToCompress = bytes
          }
    
        fun build(): OkHttpClient = OkHttpClient(this)
      }
    
      companion object {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:21:33 GMT 2024
    - 52K bytes
    - Viewed (0)
Back to top