Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 35 for byteCount (0.15 sec)

  1. okhttp-brotli/src/main/kotlin/okhttp3/brotli/internal/DecompressionBombChecker.kt

      private var outputByteCount = 0L
    
      fun wrapInput(source: Source): Source {
        return object : ForwardingSource(source) {
          override fun read(
            sink: Buffer,
            byteCount: Long,
          ): Long {
            val result = super.read(sink, byteCount)
            if (result == -1L) return result
            inputByteCount += result
            return result
          }
        }
      }
    
      fun wrapOutput(source: Source): Source {
    Plain Text
    - Registered: Fri Mar 29 11:42:11 GMT 2024
    - Last Modified: Mon Jan 29 22:50:20 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/ClientRuleEventListener.kt

        logWithTime("requestBodyStart")
    
        delegate.requestBodyStart(call)
      }
    
      override fun requestBodyEnd(
        call: Call,
        byteCount: Long,
      ) {
        logWithTime("requestBodyEnd: byteCount=$byteCount")
    
        delegate.requestBodyEnd(call, byteCount)
      }
    
      override fun requestFailed(
        call: Call,
        ioe: IOException,
      ) {
        logWithTime("requestFailed: $ioe")
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http2/Huffman.kt

        return ((bitCount + 7) shr 3).toInt() // Round up to an even byte.
      }
    
      fun decode(
        source: BufferedSource,
        byteCount: Long,
        sink: BufferedSink,
      ) {
        var node = root
        var accumulator = 0
        var accumulatorBitCount = 0
        for (i in 0 until byteCount) {
          val byteIn = source.readByte() and 0xff
          accumulator = accumulator shl 8 or byteIn
          accumulatorBitCount += 8
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  4. okhttp/src/main/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) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  5. okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseResponseInterceptor.kt

        return object : ForwardingSource(source) {
          @Throws(IOException::class)
          override fun read(
            sink: Buffer,
            byteCount: Long,
          ): Long {
            val buffer = Buffer()
            val read = delegate.read(buffer, byteCount)
            if (read != -1L) {
              sink.write(buffer.readByteString().toAsciiUppercase())
            }
            return read
          }
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  6. regression-test/README.md

    01-01 12:53:32.811 10999 11089 D OkHttp  : [49 ms] responseBodyStart
    01-01 12:53:32.811 10999 11089 D OkHttp  : [49 ms] responseBodyEnd: byteCount=128
    01-01 12:53:32.811 10999 11089 D OkHttp  : [49 ms] connectionReleased
    01-01 12:53:32.811 10999 11089 D OkHttp  : [49 ms] callEnd
    01-01 12:53:32.816 10999 11090 D OkHttp  : [54 ms] responseHeadersStart
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Nov 13 07:09:56 GMT 2020
    - 2.5K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseRequestInterceptor.kt

          @Throws(IOException::class)
          override fun write(
            source: Buffer,
            byteCount: Long,
          ) {
            val bytes = source.readByteString(byteCount)
            delegate.write(
              Buffer()
                .write(bytes.toAsciiUppercase()),
              byteCount,
            )
          }
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/MultipartReader.kt

          }
    
          override fun read(
            sink: Buffer,
            byteCount: Long,
          ): Long {
            require(byteCount >= 0L) { "byteCount < 0: $byteCount" }
            check(currentPart == this) { "closed" }
    
            source.timeout().intersectWith(timeout) {
              return when (val limit = currentPartBytesRemaining(maxResult = byteCount)) {
                0L -> -1L // No more bytes in this part.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  9. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/LoggingEventListener.kt

      }
    
      override fun requestBodyStart(call: Call) {
        logWithTime("requestBodyStart")
      }
    
      override fun requestBodyEnd(
        call: Call,
        byteCount: Long,
      ) {
        logWithTime("requestBodyEnd: byteCount=$byteCount")
      }
    
      override fun requestFailed(
        call: Call,
        ioe: IOException,
      ) {
        logWithTime("requestFailed: $ioe")
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 11:07:32 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  10. mockwebserver/src/main/kotlin/mockwebserver3/internal/ThrottledSink.kt

      private val bytesPerPeriod: Long,
      private val periodDelayNanos: Long,
    ) : Sink by delegate {
      private var bytesWrittenSinceLastDelay = 0L
    
      override fun write(
        source: Buffer,
        byteCount: Long,
      ) {
        var bytesLeft = byteCount
    
        while (bytesLeft > 0) {
          if (bytesWrittenSinceLastDelay == bytesPerPeriod) {
            flush()
            sleepNanos(periodDelayNanos)
            bytesWrittenSinceLastDelay = 0
          }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (0)
Back to top