Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 36 for Account (0.28 sec)

  1. okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt

        val relay = edit(file, upstream, metadata, 1024)
        val source1 = relay.newSource()
        val source2 = relay.newSource()
        source1!!.close()
        source1.close() // Unnecessary. Shouldn't decrement the reference count.
        assertThat(relay.isClosed).isFalse()
        source2!!.close()
        assertThat(relay.isClosed).isTrue()
        assertFile(Relay.PREFIX_DIRTY, -1L, -1, null, null)
      }
    
      @Test
      fun racingReaders() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/CallTest.kt

            return if (chunked) -1L else size
          }
    
          override fun writeTo(sink: BufferedSink) {
            var count = 0
            while (count < size) {
              sink.write(buffer, 0, Math.min(size - count, writeSize.toLong()).toInt())
              count += writeSize
            }
          }
        }
      }
    
      @Test
      fun emptyResponseBody() {
        server.enqueue(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

    internal fun checkOffsetAndCount(
      arrayLength: Long,
      offset: Long,
      count: Long,
    ) {
      if (offset or count < 0L || offset > arrayLength || arrayLength - offset < count) {
        throw ArrayIndexOutOfBoundsException("length=$arrayLength, offset=$offset, count=$offset")
      }
    }
    
    val commonEmptyHeaders: Headers = Headers.headersOf()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/ws/WebSocketReaderTest.kt

        }
        var count = 0
        while (!data.exhausted()) {
          assertFailsWith<ProtocolException> {
            clientReader.processNextFrame()
          }.also { expected ->
            assertThat(expected.message!!)
              .matches(Regex("Code \\d+ is reserved and may not be used."))
          }
          count++
        }
        assertThat(count).isEqualTo(1988)
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 14.4K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerRealBackendTest.kt

          Thread.sleep(250)
          backend.shutdown()
          return@schedule -1L
        }
    
        assertThat(queue.idleLatch().await(500L, TimeUnit.MILLISECONDS)).isTrue()
        assertThat(queue.idleLatch().count).isEqualTo(0)
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/InterceptorTest.kt

            override fun read(
              sink: Buffer,
              byteCount: Long,
            ): Long {
              val mixedCase = Buffer()
              val count = original.read(mixedCase, byteCount)
              sink.writeUtf8(mixedCase.readUtf8().uppercase())
              return count
            }
          }
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt

          frameHeader(
            streamId = 0,
            length = settings.size() * 6,
            type = TYPE_SETTINGS,
            flags = FLAG_NONE,
          )
          for (i in 0 until Settings.COUNT) {
            if (!settings.isSet(i)) continue
            val id =
              when (i) {
                4 -> 3 // SETTINGS_MAX_CONCURRENT_STREAMS renumbered.
                7 -> 4 // SETTINGS_INITIAL_WINDOW_SIZE renumbered.
    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)
  8. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

          object : WebSocketListener() {
            override fun onFailure(
              webSocket: WebSocket,
              t: Throwable,
              response: Response?,
            ) {
              if (attempts.count > 0) {
                clientListener.setNextEventDelegate(this)
                webSockets.add(client.newWebSocket(request, clientListener))
                attempts.countDown()
              }
            }
          }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 35.2K bytes
    - Viewed (1)
  9. okhttp/src/test/java/okhttp3/internal/http2/HpackTest.kt

      // Example taken from twitter/hpack DecoderTest.testInsidiousMaxHeaderSize
      @Test
      fun readHeaderTableStateChangeInsidiousMaxHeaderByteCount() {
        bytesIn.writeByte(0x3f)
        bytesIn.write("e1ffffff07".decodeHex()) // count = -2147483648
        assertFailsWith<IOException> {
          hpackReader!!.readHeaders()
        }.also { expected ->
          assertThat(expected.message)
            .isEqualTo("Invalid dynamic table size update -2147483648")
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 38.2K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/ws/MessageDeflater.kt

    import okio.Buffer
    import okio.ByteString
    import okio.ByteString.Companion.decodeHex
    import okio.DeflaterSink
    
    private val EMPTY_DEFLATE_BLOCK = "000000ffff".decodeHex()
    private const val LAST_OCTETS_COUNT_TO_REMOVE_AFTER_DEFLATION = 4
    
    class MessageDeflater(
      private val noContextTakeover: Boolean,
    ) : Closeable {
      private val deflatedBytes = Buffer()
    
      private val deflater =
        Deflater(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
Back to top