Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 46 of 46 for jbyteArray (0.12 sec)

  1. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

        connection.requestMethod = "POST"
        connection.doOutput = true
        connection.setFixedLengthStreamingMode(1024 * 1024 * 1024) // 1 GB
        connection.connect()
        val out = connection.outputStream
        val data = ByteArray(1024 * 1024)
        var i = 0
        while (i < 1024) {
          try {
            out!!.write(data)
            out.flush()
            if (i == 513) {
              // pause slightly after half way to make result more predictable
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/InterceptorTest.kt

            .build()
        server.enqueue(
          MockResponse.Builder()
            .body("abc")
            .throttleBody(1, 1, TimeUnit.SECONDS)
            .build(),
        )
        val data = ByteArray(2 * 1024 * 1024) // 2 MiB.
        val request1 =
          Request.Builder()
            .url(server.url("/"))
            .post(data.toRequestBody("text/plain".toMediaType()))
            .build()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt

            .build(),
        )
        val webSocket: WebSocket = newWebSocket()
        clientListener.assertOpen()
    
        // Send messages until the client's outgoing buffer overflows!
        val message: ByteString = ByteString.of(*ByteArray(1024 * 1024))
        var messageCount: Long = 0
        while (true) {
          val success = webSocket.send(message)
          if (!success) break
          messageCount++
          val queueSize = webSocket.queueSize()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

              if (writeKind == WriteKind.BYTE_BY_BYTE) {
                for (i in 0 until n) {
                  sink.writeByte('x'.code)
                }
              } else {
                val buf = ByteArray(if (writeKind == WriteKind.SMALL_BUFFERS) 256 else 64 * 1024)
                Arrays.fill(buf, 'x'.code.toByte())
                var i = 0
                while (i < n) {
                  sink.write(buf, 0, Math.min(buf.size, n - i))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/http2/HpackTest.kt

        val actual = bytesOut.readByteString()
        assertThat(actual).isEqualTo(expected)
      }
    
      private fun intArrayToByteArray(bytes: IntArray): ByteString {
        val data = ByteArray(bytes.size)
        for (i in bytes.indices) {
          data[i] = bytes[i].toByte()
        }
        return ByteString.of(*data)
      }
    
      private fun readerHeaderTableLength(): Int {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 38.2K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/CallTest.kt

          Request.Builder()
            .url(server.url("/"))
            .head()
            .build()
        val response = client.newCall(headRequest).execute()
        assertThat(response.code).isEqualTo(200)
        assertArrayEquals(ByteArray(0), response.body.bytes())
        val getRequest = Request(server.url("/"))
        executeSynchronously(getRequest)
          .assertCode(200)
          .assertBody("abc")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
Back to top