Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for bytesUnread (0.26 sec)

  1. platforms/core-runtime/io/src/main/java/org/gradle/internal/io/StreamByteBuffer.java

        }
    
        protected int prepareRead() {
            int bytesUnread = (currentReadChunk != null) ? currentReadChunk.bytesUnread() : 0;
            if (bytesUnread == 0) {
                if (!chunks.isEmpty()) {
                    currentReadChunk = chunks.removeFirst();
                    bytesUnread = currentReadChunk.bytesUnread();
                    totalBytesUnreadInList -= bytesUnread;
                } else if (currentReadChunk != currentWriteChunk) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 12 08:51:14 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

              val bytesToRead = minOf(byteCount, upstreamPos - sourcePos)
              buffer.copyTo(sink, sourcePos - bufferPos, bytesToRead)
              sourcePos += bytesToRead
              return bytesToRead
            }
    
          // Read from the file.
          if (source == SOURCE_FILE) {
            val bytesToRead = minOf(byteCount, upstreamPos - sourcePos)
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  3. 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: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Jan 12 03:31:36 UTC 2019
    - 3.9K bytes
    - Viewed (0)
  4. platforms/software/resources/src/main/java/org/gradle/internal/resource/ExternalResourceReadResult.java

    public class ExternalResourceReadResult<T> {
    
        private final long bytesRead;
        private final T result;
    
        private ExternalResourceReadResult(long bytesRead, T result) {
            this.bytesRead = bytesRead;
            this.result = result;
        }
    
        public static ExternalResourceReadResult<Void> of(long bytesRead) {
            return new ExternalResourceReadResult<Void>(bytesRead, null);
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  5. platforms/software/dependency-management/src/integTest/groovy/org/gradle/integtests/resolve/DependencyDownloadBuildOperationsIntegrationTest.groovy

            downloadOps[0].result.bytesRead == 0
            downloadOps[1].details.location == m.rootMetaData.uri.toString()
            downloadOps[1].result.bytesRead == 0
            downloadOps[2].details.location == m.pom.uri.toString()
            downloadOps[2].result.bytesRead == m.pom.file.length()
            downloadOps[3].details.location == m.artifact.uri.toString()
            downloadOps[3].result.bytesRead == m.artifact.file.length()
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sun Jan 14 00:59:27 UTC 2024
    - 13K bytes
    - Viewed (0)
  6. 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 Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Oct 18 15:44:36 UTC 2021
    - 4.2K bytes
    - Viewed (0)
  7. platforms/software/dependency-management/src/main/java/org/gradle/internal/resource/transfer/ProgressLoggingExternalResourceAccessor.java

            private final long bytesRead;
    
            private ReadOperationResult(long bytesRead) {
                this.bytesRead = bytesRead;
            }
    
            @Override
            public long getBytesRead() {
                return bytesRead;
            }
    
            @Override
            public String toString() {
                return "ExternalResourceReadBuildOperationType.Result{bytesRead=" + bytesRead + '}';
            }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Mar 08 12:31:19 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  8. 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: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  9. platforms/software/resources/src/test/groovy/org/gradle/internal/resource/transfer/AccessorBackedExternalResourceTest.groovy

            def result = resource.writeToIfPresent(file)
    
            then:
            result.bytesRead == 5
            file.text == "12345"
            0 * _
    
            when:
            expectResourceRead(name, "hi")
            result = resource.writeTo(file)
    
            then:
            result.bytesRead == 2
            file.text == "hi"
            0 * _
        }
    
        def "can apply Action to the content of the resource"() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  10. platforms/software/resources/src/test/groovy/org/gradle/internal/resource/local/LocalFileStandInExternalResourceTest.groovy

                }
            })
            result.bytesRead == 4
    
            def result2 = resource.withContent(new Action<InputStream>() {
                @Override
                void execute(InputStream inputStream) {
                    assert inputStream.read() == '1'
                    assert inputStream.read() == '2'
                }
            })
            result2.bytesRead == 2
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Oct 12 19:38:08 UTC 2023
    - 14K bytes
    - Viewed (0)
Back to top