- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for Integer (0.27 sec)
-
okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt
} @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) } @Test fun `decode negative integer`() { val bytes = "02019c".decodeHex() assertThat(Adapters.INTEGER_AS_LONG.fromDer(bytes)).isEqualTo(-100L)
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) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/CertificateAdapters.kt
* ``` */ internal val tbsCertificate: BasicDerAdapter<TbsCertificate> = Adapters.sequence( "TBSCertificate", Adapters.INTEGER_AS_LONG .withExplicitBox(tag = 0L) // v1 == 0. .optional(defaultValue = 0), Adapters.INTEGER_AS_BIG_INTEGER, algorithmIdentifier, name, validity, name, subjectPublicKeyInfo,
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 13.6K bytes - Viewed (1) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Adapters.kt
override fun encode( writer: DerWriter, value: Long, ) = writer.writeLong(value) }, ) val INTEGER_AS_BIG_INTEGER = BasicDerAdapter( name = "INTEGER", tagClass = DerHeader.TAG_CLASS_UNIVERSAL, tag = 2L, codec = object : BasicDerAdapter.Codec<BigInteger> {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 15K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt
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 May 03 11:42:14 GMT 2024 - Last Modified: Tue Jan 09 12:33:05 GMT 2024 - 10.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/CacheControl.kt
/** * Sets the maximum age of a cached response. If the cache response's age exceeds [maxAge], it * will not be used and a network request will be made. * * @param maxAge a non-negative integer. This is stored and transmitted with [TimeUnit.SECONDS] * precision; finer precision will be lost. */ fun maxAge( maxAge: Int, timeUnit: TimeUnit, ) = apply {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 15 13:41:01 GMT 2024 - 10K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt
// https://tools.ietf.org/html/rfc7231#section-7.1.3 // currently ignores a HTTP-date, and assumes any non int 0 is a delay if (header.matches("\\d+".toRegex())) { return Integer.valueOf(header) } return Integer.MAX_VALUE } companion object { /** * How many redirects and auth challenges should we attempt? Chrome follows 21 redirects; Firefox,
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 15 13:24:48 GMT 2024 - 12.1K bytes - Viewed (4) -
okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt
val certificatePinner: CertificatePinner? = address.certificatePinner() } @Test @Disabled fun cache() { val cache = Cache(File("/cache/"), Integer.MAX_VALUE.toLong()) val directory: File = cache.directory() } @Test @Disabled fun cacheControl() { val cacheControl: CacheControl = CacheControl.Builder().build()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 13.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt
} fun String.toLongOrDefault(defaultValue: Long): Long { return try { toLong() } catch (_: NumberFormatException) { defaultValue } } /** * Returns this as a non-negative integer, or 0 if it is negative, or [Int.MAX_VALUE] if it is too * large, or [defaultValue] if it cannot be parsed. */ internal fun String?.toNonNegativeInt(defaultValue: Int): Int { try {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 11K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Cache.kt
internal fun readInt(source: BufferedSource): Int { try { val result = source.readDecimalLong() val line = source.readUtf8LineStrict() if (result < 0L || result > Integer.MAX_VALUE || line.isNotEmpty()) { throw IOException("expected an int but was \"$result$line\"") } return result.toInt() } catch (e: NumberFormatException) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 26.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Cookie.kt
* * @throws NumberFormatException if [s] is not an integer of any precision. */ private fun parseMaxAge(s: String): Long { try { val parsed = s.toLong() return if (parsed <= 0L) Long.MIN_VALUE else parsed } catch (e: NumberFormatException) { // Check if the value is an integer (positive or negative) that's too big for a long.
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)