Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for readByteString (0.07 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Hpack.kt

            val name = getName(index)
            val value = readByteString()
            headerList.add(Header(name, value))
          }
    
          @Throws(IOException::class)
          private fun readLiteralHeaderWithoutIndexingNewName() {
            val name = checkLowercase(readByteString())
            val value = readByteString()
            headerList.add(Header(name, value))
          }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 22.4K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/MultipartReader.kt

            .writeUtf8("--")
            .writeUtf8(boundary)
            .readByteString()
    
        /**
         * This delimiter typically precedes all subsequent parts. It may also precede the first part
         * if the body contains a preamble.
         */
        private val crlfDashDashBoundary =
          Buffer()
            .writeUtf8("\r\n--")
            .writeUtf8(boundary)
            .readByteString()
    
        private var partCount = 0
        private var closed = false
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 02:11:14 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache2/Relay.kt

          val fileOperator = FileOperator(randomAccessFile.channel)
    
          // Read the header.
          val header = Buffer()
          fileOperator.read(0, header, FILE_HEADER_SIZE)
          val prefix = header.readByteString(PREFIX_CLEAN.size.toLong())
          if (prefix != PREFIX_CLEAN) throw IOException("unreadable cache file")
          val upstreamSize = header.readLong()
          val metadataSize = header.readLong()
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 17:15:47 UTC 2025
    - 11.8K bytes
    - Viewed (0)
  7. 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)
  8. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

            throw IOException(
              "response size exceeds limit ($MAX_RESPONSE_SIZE bytes): ${body.contentLength()} bytes",
            )
          }
    
          val responseBytes = body.source().readByteString()
    
          return DnsRecordCodec.decodeAnswers(hostname, responseBytes)
        }
      }
    
      private fun buildRequest(
        hostname: String,
        type: Int,
      ): Request =
        Request
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat May 10 11:15:14 UTC 2025
    - 8.6K bytes
    - Viewed (0)
  9. okhttp/src/commonJvmAndroid/kotlin/okhttp3/ResponseBody.kt

       * may trigger an [OutOfMemoryError]. Prefer to stream the response body if this is a
       * possibility for your response.
       */
      @Throws(IOException::class)
      fun byteString() = consumeSource(BufferedSource::readByteString) { it.size }
    
      private inline fun <T : Any> ResponseBody.consumeSource(
        consumer: (BufferedSource) -> T,
        sizeMapper: (T) -> Int,
      ): T {
        val contentLength = contentLength()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Tue May 27 14:51:25 UTC 2025
    - 11.6K bytes
    - Viewed (0)
  10. 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)
Back to top