Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for bytesUnread (0.16 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. 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)
  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/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)
  6. 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)
  7. 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)
  8. 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)
  9. src/internal/trace/testdata/cmd/gotraceeventstats/main.go

    		size += binary.PutUvarint(buf[:], uint64(len(e.Data)))
    		size += len(e.Data)
    	}
    	return size
    }
    
    type countingReader struct {
    	io.Reader
    	bytesRead int
    }
    
    func (r *countingReader) Read(b []byte) (int, error) {
    	n, err := r.Reader.Read(b)
    	r.bytesRead += n
    	return n, err
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 20:31:29 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  10. 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 Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Sep 18 17:00:54 UTC 2023
    - 10.8K bytes
    - Viewed (0)
Back to top