Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 81 for ByteCount (0.24 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/RecordingEventListener.kt

        request: Request,
      ) = logEvent(RequestHeadersEnd(System.nanoTime(), call, request.headers.byteCount()))
    
      override fun requestBodyStart(call: Call) = logEvent(RequestBodyStart(System.nanoTime(), call))
    
      override fun requestBodyEnd(
        call: Call,
        byteCount: Long,
      ) = logEvent(RequestBodyEnd(System.nanoTime(), call, byteCount))
    
      override fun requestFailed(
        call: Call,
        ioe: IOException,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 14:58:02 UTC 2025
    - 9.5K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/HeadersJvmTest.kt

    import okhttp3.Headers.Companion.toHeaders
    import org.junit.jupiter.api.Test
    
    class HeadersJvmTest {
      @Test fun byteCount() {
        assertThat(Headers.EMPTY.byteCount()).isEqualTo(0L)
        assertThat(
          Headers
            .Builder()
            .add("abc", "def")
            .build()
            .byteCount(),
        ).isEqualTo(10L)
        assertThat(
          Headers
            .Builder()
            .add("abc", "def")
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 14:51:25 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/MultipartReader.kt

          }
    
          override fun read(
            sink: Buffer,
            byteCount: Long,
          ): Long {
            require(byteCount >= 0L) { "byteCount < 0: $byteCount" }
            check(currentPart == this) { "closed" }
    
            return source.timeout().intersectWith(timeout) {
              when (val limit = currentPartBytesRemaining(maxByteCount = byteCount)) {
                0L -> -1L // No more bytes in this part.
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 02:11:14 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/PushObserver.kt

       * @param source location of data corresponding with this stream ID.
       * @param byteCount number of bytes to read or skip from the source.
       * @param last when true, there are no data frames to follow.
       */
      @Throws(IOException::class)
      fun onData(
        streamId: Int,
        source: BufferedSource,
        byteCount: Int,
        last: Boolean,
      ): Boolean
    
      /** Indicates the reason why this stream was canceled. */
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache/FaultHidingSink.kt

    ) : ForwardingSink(delegate) {
      private var hasErrors = false
    
      override fun write(
        source: Buffer,
        byteCount: Long,
      ) {
        if (hasErrors) {
          source.skip(byteCount)
          return
        }
        try {
          super.write(source, byteCount)
        } catch (e: IOException) {
          hasErrors = true
          onException(e)
        }
      }
    
      override fun flush() {
        if (hasErrors) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb1/smb1/AndXServerMessageBlockTest.java

            buf[1] = 0x66; // andxCommand
            ServerMessageBlock.writeInt2(50, buf, 3); // andxOffset
            ServerMessageBlock.writeInt2(20, buf, 9); // byteCount for main block
    
            // At offset 50, the implementation writes andx.wordCount (0) to buffer
            // Then reads byteCount at offset 51
            ServerMessageBlock.writeInt2(20, buf, 51);
    
            int n = block.readAndXWireFormat(buf, 0);
            assertTrue(n > 0);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 12.5K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb1/smb1/ServerMessageBlockTest.java

                return wordCount * 2;
            }
    
            @Override
            int readBytesWireFormat(byte[] buffer, int bufferIndex) {
                System.arraycopy(buffer, bufferIndex, bytes, 0, byteCount);
                return byteCount;
            }
        }
    
        @BeforeEach
        void setUp() {
            smb = new TestServerMessageBlock();
        }
    
        @Test
        void testInt2ReadWrite() {
            byte[] buffer = new byte[2];
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  8. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2Stream.kt

        internal var closed: Boolean = false
    
        @Throws(IOException::class)
        override fun read(
          sink: Buffer,
          byteCount: Long,
        ): Long {
          require(byteCount >= 0L) { "byteCount < 0: $byteCount" }
    
          while (true) {
            var tryAgain = false
            var readBytesDelivered = -1L
            var errorExceptionToDeliver: IOException? = null
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 07 18:57:05 UTC 2025
    - 22.4K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/kt/UploadProgress.kt

              private var completed = false
    
              override fun write(
                source: Buffer,
                byteCount: Long,
              ) {
                super.write(source, byteCount)
                totalBytesWritten += byteCount
                progressListener.update(totalBytesWritten, contentLength(), completed)
              }
    
              override fun close() {
                super.close()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 17:01:12 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  10. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Response.kt

      /**
       * Peeks up to [byteCount] bytes from the response body and returns them as a new response
       * body. If fewer than [byteCount] bytes are in the response body, the full response body is
       * returned. If more than [byteCount] bytes are in the response body, the returned value
       * will be truncated to [byteCount] bytes.
       *
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 28 14:39:28 UTC 2025
    - 18.1K bytes
    - Viewed (0)
Back to top