Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for readByteString (0.05 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/publicsuffix/BasePublicSuffixList.kt

          listSource().buffer().use { bufferedSource ->
            val totalBytes = bufferedSource.readInt()
            publicSuffixListBytes = bufferedSource.readByteString(totalBytes.toLong())
    
            val totalExceptionBytes = bufferedSource.readInt()
            publicSuffixExceptionListBytes = bufferedSource.readByteString(totalExceptionBytes.toLong())
          }
    
          synchronized(this) {
            this.bytes = publicSuffixListBytes!!
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 28 07:33:49 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/WebSocketReader.kt

            maskCursor.close()
          }
        }
    
        when (opcode) {
          OPCODE_CONTROL_PING -> {
            frameCallback.onReadPing(controlFrameBuffer.readByteString())
          }
          OPCODE_CONTROL_PONG -> {
            frameCallback.onReadPong(controlFrameBuffer.readByteString())
          }
          OPCODE_CONTROL_CLOSE -> {
            var code = CLOSE_NO_STATUS_CODE
            var reason = ""
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue Jul 29 22:04:11 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  3. okhttp-zstd/src/test/java/okhttp3/zstd/ZstdInterceptorTest.kt

        result.zstdCompress().buffer().use {
          it.write(this@zstdCompress)
        }
        return result.readByteString()
      }
    
      private fun ByteString.gzipCompress(): ByteString {
        val result = Buffer()
        (result as Sink).gzip().buffer().use {
          it.write(this@gzipCompress)
        }
        return result.readByteString()
      }
    
      private fun response(
        url: String,
        body: ByteString,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Aug 01 06:04:22 UTC 2025
    - 4.8K bytes
    - Viewed (1)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/WebSocketWriter.kt

            validateCloseCode(code)
          }
          payload =
            Buffer().run {
              writeShort(code)
              if (reason != null) {
                write(reason)
              }
              readByteString()
            }
        }
    
        try {
          writeControlFrame(OPCODE_CONTROL_CLOSE, payload)
        } finally {
          writerClosed = true
        }
      }
    
      @Throws(IOException::class)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 6K bytes
    - Viewed (0)
  5. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

          requestLine = request,
          headers = headers.build(),
          chunkSizes = chunkSizes,
          bodySize = requestBody.receivedByteCount,
          body =
            when {
              hasBody -> requestBody.buffer.readByteString()
              else -> null
            },
          connectionIndex = connectionIndex,
          exchangeIndex = exchangeIndex,
          socket = socket,
          failure = failure,
        )
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 20:36:00 UTC 2025
    - 40.3K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/RequestTest.kt

          assertThat(it).hasMessage("Content-Encoding already set: gzip")
        }
      }
    
      private fun bodyToHex(body: RequestBody): String {
        val buffer = Buffer()
        body.writeTo(buffer)
        return buffer.readByteString().hex()
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 19K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/Http2ConnectionTest.kt

        assertThat(stream.takeHeaders()).isEqualTo(headersOf("a", "android"))
        val source = stream.source
        assertFailsWith<EOFException> {
          source.buffer().readByteString(101)
        }
      }
    
      @Test fun blockedStreamDoesntStarveNewStream() {
        val framesThatFillWindow =
          roundUp(Settings.DEFAULT_INITIAL_WINDOW_SIZE, peer.maxOutboundDataLength())
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 75.5K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

        // The response is not decompressed.
        val response = call.execute()
        assertThat(response.header("Content-Encoding")).isEqualTo("gzip")
        assertThat(response.body.source().readByteString()).isEqualTo(
          gzippedBody.snapshot(),
        )
    
        // The request did not offer gzip support.
        val recordedRequest = server.takeRequest()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 146.6K bytes
    - Viewed (0)
Back to top