- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 71 for exhaust (0.03 sec)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/MultipartReader.kt
} /** * Returns a value in [0..maxByteCount] with the number of bytes that can be read from [source] * in the current part. If this returns 0 the current part is exhausted; otherwise it has at * least one byte left to read. */ private fun currentPartBytesRemaining(maxByteCount: Long): Long { val toIndex = minOf(source.buffer.size, maxByteCount) + 1L
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed May 28 02:11:14 UTC 2025 - 7.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/Progress.java
@Override public long read(Buffer sink, long byteCount) throws IOException { long bytesRead = super.read(sink, byteCount); // read() returns the number of bytes read, or -1 if this source is exhausted. totalBytesRead += bytesRead != -1 ? bytesRead : 0; progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1); return bytesRead; } }; }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jan 12 03:31:36 UTC 2019 - 3.9K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/WebPlatformUrlTestData.kt
list += element } return list } private fun unescape(s: String): String = buildString { val buffer = Buffer().writeUtf8(s) while (!buffer.exhausted()) { val c = buffer.readUtf8CodePoint() if (c != '\\'.code) { append(c.toChar()) continue } when (buffer.readUtf8CodePoint()) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.7K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt
currentLabelByteIndex++ if (publicSuffixByteIndex == publicSuffixLength) break if (labels[currentLabelIndex].size == currentLabelByteIndex) { // We've exhausted our current label. Either there are more labels to compare, in which // case we expect a dot as the next character. Otherwise, we've checked all our labels. if (currentLabelIndex == labels.size - 1) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 28 07:33:49 UTC 2025 - 8.5K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/Http2Test.kt
frame.writeByte(paddingLength) frame.write(expectedData) frame.write(padding) reader.nextFrame(requireSettings = false, assertData()) // Padding was skipped. assertThat(frame.exhausted()).isTrue() } @Test fun readPaddedDataFrameZeroPadding() { val dataLength = 1123 val expectedData = ByteArray(dataLength) Arrays.fill(expectedData, 2.toByte())
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 28.1K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Connection.kt
* bookkeeping easier for the caller: releasing the allocation as soon as the terminal stream has * been found. But only complete the stream once its data stream has been exhausted. */ interface Connection { /** Returns the route used by this connection. */ fun route(): Route /** * Returns the socket that this connection is using. Returns an
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 4.3K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt
try { while (currentTask != self) { taskRunner.wait() } } finally { serialTaskQueue.remove(yieldCompleteTask) } // If we're yielding until we're exhausted and a task run, keep going until a task doesn't run. if (strategy == ResumePriority.AfterOtherTasks && otherTasksStarted) { return yieldUntil(strategy, condition) } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed May 28 23:28:25 UTC 2025 - 11.9K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/TestUtilJvm.kt
// Write each byte into a new buffer, then clone it so that the segments are shared. // Shared segments cannot be compacted so we'll get a long chain of short segments. val result = Buffer() while (!buffer.exhausted()) { val box = Buffer() box.write(buffer, 1) result.write(box.copy(), 1) } return result } tailrec fun File.isDescendentOf(directory: File): Boolean {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 4.3K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/collect/testing/IteratorTester.java
* * <p>The value you pass to the parameter {@code steps} should be greater than the length of your * iterator, so that this class can check that your iterator behaves correctly when it is exhausted. * * <p>For example, to test {@link java.util.Collections#unmodifiableList(java.util.List) * Collections.unmodifiableList}'s iterator: * * {@snippet : * List<String> expectedElements =
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Mar 17 20:26:29 UTC 2025 - 4.3K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/CertificateAdapters.kt
override fun fromDer(reader: DerReader): Long { val peekHeader = reader.peekHeader() ?: throw ProtocolException("expected time but was exhausted at $reader") return when { peekHeader.tagClass == Adapters.UTC_TIME.tagClass && peekHeader.tag == Adapters.UTC_TIME.tag -> { Adapters.UTC_TIME.fromDer(reader) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 13.6K bytes - Viewed (0)