Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for CharArray (0.26 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/TestUtilJvm.kt

        return List(elements.size / 2) { Header(elements[it * 2]!!, elements[it * 2 + 1]!!) }
      }
    
      @JvmStatic
      fun repeat(
        c: Char,
        count: Int,
      ): String {
        val array = CharArray(count)
        Arrays.fill(array, c)
        return String(array)
      }
    
      /**
       * Okio buffers are internally implemented as a linked list of arrays. Usually this implementation
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  2. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

        assertThat(recordedRequest.path)
          .isEqualTo("/lookup?ct&dns=AAABAAABAAAAAAAABmdvb2dsZQNjb20AAAEAAQ")
      }
    
      @Test
      fun failOnExcessiveResponse() {
        val array = CharArray(128 * 1024 + 2) { '0' }
        server.enqueue(dnsResponse(String(array)))
        try {
          dns.lookup("google.com")
          fail<Any>()
        } catch (ioe: IOException) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 11K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

      @ArgumentsSource(ProtocolParamProvider::class)
      fun readTimeoutMoreGranularThanBodySize(
        protocol: Protocol,
        mockWebServer: MockWebServer,
      ) {
        setUp(protocol, mockWebServer)
        val body = CharArray(4096) // 4KiB to read.
        Arrays.fill(body, 'y')
        server.enqueue(
          MockResponse.Builder()
            .body(String(body))
            .throttleBody(1024, 1, TimeUnit.SECONDS) // Slow connection 1KiB/second.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/CallTest.kt

          .assertFailureMatches(".*unexpected end of stream on " + server.url("/").redact())
      }
    
      private fun stringFill(
        fillChar: Char,
        length: Int,
      ): String {
        val value = CharArray(length)
        Arrays.fill(value, fillChar)
        return String(value)
      }
    
      @Test
      fun canceledBeforeExecute() {
        val call = client.newCall(Request.Builder().url(server.url("/a")).build())
    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)
Back to top