Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for byteCount (0.23 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt

        streamId: Int,
        byteCount: Long,
      ) {
        var byteCount = byteCount
        while (byteCount > 0L) {
          val length = minOf(maxFrameSize.toLong(), byteCount)
          byteCount -= length
          frameHeader(
            streamId = streamId,
            length = length.toInt(),
            type = TYPE_CONTINUATION,
            flags = if (byteCount == 0L) FLAG_END_HEADERS else 0,
          )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  2. 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)
  3. okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt

      name: String,
      defaultValue: String?,
    ): String? = headers[name] ?: defaultValue
    
    @Throws(IOException::class)
    fun Response.commonPeekBody(byteCount: Long): ResponseBody {
      val peeked = body.source().peek()
      val buffer = Buffer()
      peeked.request(byteCount)
      buffer.write(peeked, minOf(byteCount, peeked.buffer.size))
      return buffer.asResponseBody(body.contentType(), buffer.size)
    }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  4. okhttp/src/main/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
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  5. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

      fun writeData(
        streamId: Int,
        outFinished: Boolean,
        buffer: Buffer?,
        byteCount: Long,
      ) {
        // Empty data frames are not flow-controlled.
        if (byteCount == 0L) {
          writer.data(outFinished, streamId, buffer, 0)
          return
        }
    
        var byteCount = byteCount
        while (byteCount > 0L) {
          var toWrite: Int
          this.withLock {
            try {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/SocksProxy.kt

            val buffer = Buffer()
            try {
              sink.use {
                source.use {
                  while (true) {
                    val byteCount = source.read(buffer, 8192L)
                    if (byteCount == -1L) break
                    sink.write(buffer, byteCount)
                    sink.emit()
                  }
                }
              }
            } catch (e: IOException) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

            private var cacheRequestClosed = false
    
            @Throws(IOException::class)
            override fun read(
              sink: Buffer,
              byteCount: Long,
            ): Long {
              val bytesRead: Long
              try {
                bytesRead = source.read(sink, byteCount)
              } catch (e: IOException) {
                if (!cacheRequestClosed) {
                  cacheRequestClosed = true
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  8. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

        override fun write(
          source: Buffer,
          byteCount: Long,
        ) {
          val toRead = minOf(remainingByteCount, byteCount)
          if (toRead > 0L) {
            source.read(buffer, toRead)
          }
          val toSkip = byteCount - toRead
          if (toSkip > 0L) {
            source.skip(toSkip)
          }
          remainingByteCount -= toRead
          receivedByteCount += byteCount
        }
    
        @Throws(IOException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        val name: String = headers.name(0)
        val value: String = headers.value(0)
        val names: Set<String> = headers.names()
        val values: List<String> = headers.values("")
        val byteCount: Long = headers.byteCount()
        val builder: Headers.Builder = headers.newBuilder()
        val multimap: Map<String, List<String>> = headers.toMultimap()
      }
    
      @Test
      fun headersBuilder() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  10. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

            .build()
        connection.start(sendConnectionPreface = false)
        val queues = taskRunner.activeQueues()
        assertThat(queues).hasSize(1)
      }
    
      private fun data(byteCount: Int): Buffer = Buffer().write(ByteArray(byteCount))
    
      private fun assertStreamData(
        expected: String?,
        source: Source?,
      ) {
        val actual = source!!.buffer().readUtf8()
        assertThat(actual).isEqualTo(expected)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 75.4K bytes
    - Viewed (0)
Back to top