- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for BytesRead (0.1 sec)
-
internal/s3select/progress.go
type countUpReader struct { reader io.Reader bytesRead int64 } // Max bzip2 concurrency across calls. 50% of GOMAXPROCS. var bz2Limiter = pbzip2.CreateConcurrencyPool((runtime.GOMAXPROCS(0) + 1) / 2) func (r *countUpReader) Read(p []byte) (n int, err error) { n, err = r.reader.Read(p) atomic.AddInt64(&r.bytesRead, int64(n)) return n, err } func (r *countUpReader) BytesRead() int64 { if r == nil { return 0 }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 22 00:33:43 UTC 2024 - 4.3K bytes - Viewed (0) -
okhttp/src/main/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Mar 22 07:09:21 UTC 2024 - 10.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/Progress.java
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 Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 12 03:31:36 UTC 2019 - 3.9K bytes - Viewed (0) -
okhttp/src/main/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/Exchange.kt
} fun <E : IOException?> bodyComplete( bytesRead: Long, responseDone: Boolean, requestDone: Boolean, e: E, ): E { if (e != null) { trackFailure(e) } if (requestDone) { if (e != null) { eventListener.requestFailed(call, e) } else { eventListener.requestBodyEnd(call, bytesRead) } } if (responseDone) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.2K bytes - Viewed (0) -
internal/hash/reader.go
n, err := r.src.Read(p) r.bytesRead += int64(n) if r.sha256 != nil { r.sha256.Write(p[:n]) } if r.contentHasher != nil { r.contentHasher.Write(p[:n]) } if err == io.EOF { // Verify content SHA256, if set. if r.expectedMin > 0 { if r.bytesRead < r.expectedMin { return 0, SizeTooSmall{Want: r.expectedMin, Got: r.bytesRead} } } if r.expectedMax > 0 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 19 12:59:07 UTC 2024 - 10.9K bytes - Viewed (0) -
internal/http/request-recorder.go
buf bytes.Buffer // total bytes read including header size bytesRead int } // Close is a no operation closer func (r *RequestRecorder) Close() error { // no-op return nil } // Read reads from the internal reader and counts/save the body in the memory func (r *RequestRecorder) Read(p []byte) (n int, err error) { n, err = r.Reader.Read(p) r.bytesRead += n if r.LogBody { r.buf.Write(p[:n]) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Apr 12 21:37:19 UTC 2023 - 1.8K bytes - Viewed (0) -
okhttp/src/main/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 11.8K 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 Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.5K bytes - Viewed (0)