- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for toNonNegativeInt (0.16 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/-CacheControlCommon.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:41:01 UTC 2024 - 7.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt
import okhttp3.Request import okhttp3.Response import okhttp3.internal.http.HTTP_PERM_REDIRECT import okhttp3.internal.http.HTTP_TEMP_REDIRECT import okhttp3.internal.http.toHttpDateOrNull import okhttp3.internal.toNonNegativeInt /** * Given a request and cached response, this figures out whether to use the network, the cache, or * both. * * Selecting a cache strategy may add conditions to the request (like the "If-Modified-Since" header
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:24:48 UTC 2024 - 12K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt
} } /** * 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 { val value = this?.toLong() ?: return defaultValue return when { value > Int.MAX_VALUE -> Int.MAX_VALUE value < 0 -> 0 else -> value.toInt() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon May 13 13:42:37 UTC 2024 - 11K bytes - Viewed (0)