- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for bytesRead (0.04 sec)
-
src/test/java/org/codelibs/curl/io/ContentCacheTest.java
try (InputStream stream = cache.getInputStream()) { assertNotNull(stream); byte[] buffer = new byte[1024]; int bytesRead = stream.read(buffer); assertEquals(data.length, bytesRead); String result = new String(buffer, 0, bytesRead, "UTF-8"); assertEquals(testContent, result); } } @Test
Registered: Thu Sep 04 15:34:10 UTC 2025 - Last Modified: Thu Jul 31 01:01:12 UTC 2025 - 10.3K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache2/FileOperator.kt
} var mutablePos = pos var mutableByteCount = byteCount while (mutableByteCount > 0L) { val bytesRead = fileChannel.transferTo(mutablePos, mutableByteCount, sink) mutablePos += bytesRead mutableByteCount -= bytesRead } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 2.4K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/CacheInterceptor.kt
} throw e } if (bytesRead == -1L) { if (!cacheRequestClosed) { cacheRequestClosed = true cacheBody.close() // The cache response is complete! } return -1 } sink.copyTo(cacheBody.buffer, sink.size - bytesRead, bytesRead) cacheBody.emitCompleteSegments() return bytesRead
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 10.3K bytes - Viewed (0) -
src/test/java/org/codelibs/curl/CurlResponseTest.java
assertNotNull(stream); byte[] buffer = new byte[1024]; int bytesRead = stream.read(buffer); assertEquals(data.length, bytesRead); assertArrayEquals(data, Arrays.copyOf(buffer, bytesRead)); } } @Test public void testGetContentAsStreamWithoutCache() { CurlResponse response = new CurlResponse();
Registered: Thu Sep 04 15:34:10 UTC 2025 - Last Modified: Thu Jul 31 01:01:12 UTC 2025 - 11.5K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/MessageInflater.kt
val totalBytesToRead = inflater.bytesRead + deflatedBytes.size // We cannot read all, as the source does not close. // Instead, we ensure that all bytes from source have been processed by inflater. do { inflaterSource.readOrInflate(buffer, Long.MAX_VALUE) } while (inflater.bytesRead < totalBytesToRead && !inflater.finished()) } @Throws(IOException::class)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 1.8K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache2/Relay.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed May 28 17:15:47 UTC 2025 - 11.8K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/Exchange.kt
fun bodyComplete( bytesRead: Long = -1L, responseDone: Boolean = false, requestDone: Boolean = false, e: IOException?, ): IOException? { if (e != null) { trackFailure(e) } if (requestDone) { if (e != null) { eventListener.requestFailed(call, e) } else { eventListener.requestBodyEnd(call, bytesRead) } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Jul 29 22:04:11 UTC 2025 - 9.7K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/MessageDeflaterInflaterTest.kt
} /** * We had a bug where self-finishing inflater streams would infinite loop! * https://github.com/square/okhttp/issues/8078 */ @Test fun `inflate returns finished before bytesRead reaches input length`() { val inflater = MessageInflater(false) val message = "53621260020000".decodeHex() assertThat(inflater.inflate(message)).isEqualTo("22021002".decodeHex()) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 5K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt
private class CountingSource( source: Source, ) : ForwardingSource(source) { var bytesRead = 0L override fun read( sink: Buffer, byteCount: Long, ): Long { val result = delegate.read(sink, byteCount) if (result == -1L) return -1L bytesRead += result return result } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 10.5K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/CallEvent.kt
override val timestampNs: Long, override val call: Call, ) : CallEvent() data class ResponseBodyEnd( override val timestampNs: Long, override val call: Call, val bytesRead: Long, ) : CallEvent() { override fun closes(event: CallEvent): Boolean = event is ResponseBodyStart && call == event.call } data class ResponseFailed( override val timestampNs: Long,
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue May 27 14:58:02 UTC 2025 - 7K bytes - Viewed (0)