- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 29 for exhaust (0.04 sec)
-
guava/src/com/google/common/io/CharStreams.java
* Returns the total number of chars read. Does not close the stream. * * @since 20.0 */ @CanIgnoreReturnValue public static long exhaust(Readable readable) throws IOException { long total = 0; long read; CharBuffer buf = createBuffer(); while ((read = readable.read(buf)) != -1) { total += read;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 30 17:25:01 UTC 2025 - 10.9K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilJvm.kt
timeout().deadlineNanoTime(nowNs + originalDurationNs) } } } @Throws(IOException::class) internal fun BufferedSource.skipAll() { while (!exhausted()) { skip(buffer.size) } } /** * Attempts to exhaust this, returning true if successful. This is useful when reading a complete * source is helpful, such as when doing so completes a cache body or frees a socket connection for * reuse. */
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 10.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/BaseEncodingTest.java
// See https://github.com/google/guava/issues/3542 Reader reader = new StringReader(cannotDecode); InputStream decodingStream = encoding.decodingStream(reader); try { ByteStreams.exhaust(decodingStream); fail("Expected DecodingException"); } catch (DecodingException expected) { // Don't assert on the expectedMessage; the messages for exceptions thrown from the
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 24.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/BaseEncodingTest.java
// See https://github.com/google/guava/issues/3542 Reader reader = new StringReader(cannotDecode); InputStream decodingStream = encoding.decodingStream(reader); try { ByteStreams.exhaust(decodingStream); fail("Expected DecodingException"); } catch (DecodingException expected) { // Don't assert on the expectedMessage; the messages for exceptions thrown from the
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 24.7K bytes - Viewed (0) -
guava/src/com/google/common/io/ByteStreams.java
* reached. Returns the total number of bytes read. Does not close the stream. * * @since 20.0 */ @CanIgnoreReturnValue public static long exhaust(InputStream in) throws IOException { long total = 0; long read; byte[] buf = createBuffer(); while ((read = in.read(buf)) != -1) { total += read; } return total; }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Jul 17 15:26:41 UTC 2025 - 31.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CacheTest.kt
.url(server.url("/")) .method(method, null) .build() val response = client.newCall(request).execute() assertThat(response.code).isEqualTo(expectedResponseCode) // Exhaust the content stream. response.body.string() val cached = cacheGet(cache, request) if (shouldWriteToCache) { assertThat(cached).isNotNull() cached!!.body.close() } else {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 113.6K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/MockSocketHandler.kt
apply { actions += { stream -> if (!stream.source.exhausted()) throw AssertionError("expected exhausted") } } fun cancelStream() = apply { actions += { stream -> stream.cancel() } } fun requestIOException() = apply { actions += { stream -> try { stream.source.exhausted() throw AssertionError("expected IOException")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 3.3K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2Stream.kt
* Returns the trailers if they're immediately available. */ @Throws(IOException::class) fun peekTrailers(): Headers? { withLock { if (source.finished && source.receiveBuffer.exhausted() && source.readBuffer.exhausted()) { return source.trailers ?: Headers.EMPTY } if (errorCode != null) { throw errorException ?: StreamResetException(errorCode!!) } return null }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 18:57:05 UTC 2025 - 22.4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Iterators.java
UnmodifiableIterator<T> iterator) { return checkNotNull(iterator); } /** * Returns the number of elements remaining in {@code iterator}. The iterator will be left * exhausted: its {@code hasNext()} method will return {@code false}. */ public static int size(Iterator<?> iterator) { long count = 0L; while (iterator.hasNext()) { iterator.next(); count++; }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 50.5K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/SocketEffect.kt
) : SocketEffect /** * On HTTP/2, send a [GOAWAY frame](https://tools.ietf.org/html/rfc7540#section-6.8) immediately * after the response and will close the connection when the client's socket is exhausted. * * On HTTP/1 this closes the socket. */ public object ShutdownConnection : SocketEffect /** * On HTTP/2 this will send the error code on the stream. *
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 1.6K bytes - Viewed (0)