- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 42 for exhaust (0.1 sec)
-
okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt
fun readerEmpty() { val body = body("") assertThat(exhaust(body.charStream())).isEqualTo("") } @Test fun readerLooksLikeBomButTooShort() { val body = body("000048") assertThat(exhaust(body.charStream())).isEqualTo("\u0000\u0000H") } @Test fun readerDefaultsToUtf8() { val body = body("68656c6c6f") assertThat(exhaust(body.charStream())).isEqualTo("hello") } @Test
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon May 13 13:42:37 UTC 2024 - 13K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CharStreamsTest.java
Reader reader = new StringReader(ASCII); assertEquals(ASCII.length(), CharStreams.exhaust(reader)); assertEquals(-1, reader.read()); assertEquals(0, CharStreams.exhaust(reader)); Reader empty = new StringReader(""); assertEquals(0, CharStreams.exhaust(empty)); assertEquals(-1, empty.read()); } public void testExhaust_readable() throws IOException {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 11.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/CharStreamsTest.java
Reader reader = new StringReader(ASCII); assertEquals(ASCII.length(), CharStreams.exhaust(reader)); assertEquals(-1, reader.read()); assertEquals(0, CharStreams.exhaust(reader)); Reader empty = new StringReader(""); assertEquals(0, CharStreams.exhaust(empty)); assertEquals(-1, empty.read()); } public void testExhaust_readable() throws IOException {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 11.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt
} true // Success! The source has been exhausted. } catch (_: InterruptedIOException) { false // We ran out of time before exhausting the source. } finally { if (originalDurationNs == Long.MAX_VALUE) { timeout().clearDeadline() } else { timeout().deadlineNanoTime(nowNs + originalDurationNs) } } } /**
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon May 13 13:42:37 UTC 2024 - 10.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt
} /** * Returns a new source that writes bytes to [cacheRequest] as they are read by the source * consumer. This is careful to discard bytes left over when the stream is closed; otherwise we * may never exhaust the source stream and therefore not complete the cached response. */ @Throws(IOException::class) private fun cacheWritingResponse( cacheRequest: CacheRequest?, response: Response, ): Response {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Mar 22 07:09:21 UTC 2024 - 10.2K bytes - Viewed (0) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed May 17 14:35:11 UTC 2023 - 10.9K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 16:27:30 UTC 2024 - 24.6K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 16:27:30 UTC 2024 - 24.6K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ByteSource.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 26.2K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 29.7K bytes - Viewed (0)