- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for minOf (0.08 sec)
-
mockwebserver/src/main/kotlin/mockwebserver3/internal/ThrottledSink.kt
while (bytesLeft > 0) { if (bytesWrittenSinceLastDelay == bytesPerPeriod) { flush() sleepNanos(periodDelayNanos) bytesWrittenSinceLastDelay = 0 } val toWrite = minOf(bytesLeft, bytesPerPeriod - bytesWrittenSinceLastDelay) bytesWrittenSinceLastDelay += toWrite bytesLeft -= toWrite delegate.write(source, toWrite) } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.5K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/internal/TriggerSink.kt
byteCount: Long, ) { if (byteCount == 0L) return // Avoid double-triggering. if (bytesWritten == triggerByteCount) { source.skip(byteCount) return } val toWrite = minOf(byteCount, triggerByteCount - bytesWritten) bytesWritten += toWrite delegate.write(source, toWrite) if (bytesWritten == triggerByteCount) { trigger() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/MultipartReader.kt
source.require(crlfDashDashBoundary.size.toLong()) return when (val delimiterIndex = source.buffer.indexOf(crlfDashDashBoundary)) { -1L -> minOf(maxResult, source.buffer.size - crlfDashDashBoundary.size + 1) else -> minOf(maxResult, delimiterIndex) } } @Throws(IOException::class) override fun close() { if (closed) return closed = true
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt
@Throws(IOException::class) fun Response.commonPeekBody(byteCount: Long): ResponseBody { val peeked = body.source().peek() val buffer = Buffer() peeked.request(byteCount) buffer.write(peeked, minOf(byteCount, peeked.buffer.size)) return buffer.asResponseBody(body.contentType(), buffer.size) } fun Response.commonNewBuilder(): Response.Builder = Response.Builder(this) val Response.commonIsRedirect: Boolean
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:24:48 UTC 2024 - 5.2K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/Certificates.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/platform/android/AndroidLog.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.9K bytes - Viewed (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt
maxChunkSize: Int, ) = apply { removeHeader("Content-Length") headersBuilder.add(CHUNKED_BODY_HEADER) val bytesOut = Buffer() while (!body.exhausted()) { val chunkSize = minOf(body.size, maxChunkSize.toLong()) bytesOut.writeHexadecimalUnsignedLong(chunkSize) bytesOut.writeUtf8("\r\n") bytesOut.write(body, chunkSize) bytesOut.writeUtf8("\r\n") }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.2K bytes - Viewed (0)