Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for ByteArray (0.16 sec)

  1. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

        @JvmField var errorCode: ErrorCode? = null
    
        @JvmField var windowSizeIncrement: Long = 0
    
        @JvmField var headerBlock: List<Header>? = null
    
        @JvmField var data: ByteArray? = null
    
        @JvmField var settings: Settings? = null
    
        @JvmField var ack = false
    
        @JvmField var payload1 = 0
    
        @JvmField var payload2 = 0
    
        override fun settings(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt

        assertThat(actual).isEqualTo(expected)
      }
    
      companion object {
        private fun binaryData(length: Int): ByteString {
          val junk = ByteArray(length)
          Random(0).nextBytes(junk)
          return junk.toByteString()
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.3K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/HostnamesTest.kt

      }
    
      @Test
      fun canonicalizeInetAddressIPv6RepresentationOfCompatibleIPV4() {
        val addressAIpv6 = decodeIpv6("::192.168.0.1")!!
        assertThat(canonicalizeInetAddress(addressAIpv6)).isEqualTo(
          ByteArray(12) +
            byteArrayOf(
              192.toByte(),
              168.toByte(),
              0,
              1,
            ),
        )
      }
    
      @Test
      fun canonicalizeInetAddressIPv6RepresentationOfMappedIPV4() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 30 06:23:33 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/platform/android/AndroidSocketAdapter.kt

      private val getAlpnSelectedProtocol = sslSocketClass.getMethod("getAlpnSelectedProtocol")
      private val setAlpnProtocols =
        sslSocketClass.getMethod("setAlpnProtocols", ByteArray::class.java)
    
      override fun isSupported(): Boolean = AndroidPlatform.isSupported
    
      override fun matchesSocket(sslSocket: SSLSocket): Boolean = sslSocketClass.isInstance(sslSocket)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt

        }
      }
    
      @Test
      fun interruptReadingResponseBody() {
        val responseBodySize = 8 * 1024 * 1024 // 8 MiB.
        server.enqueue(
          MockResponse()
            .setBody(Buffer().write(ByteArray(responseBodySize)))
            .throttleBody((64 * 1024).toLong(), 125, TimeUnit.MILLISECONDS),
        ) // 500 Kbps
        server.start()
        val call =
          client.newCall(
            Request.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  6. okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingSSLSession.kt

    import javax.security.cert.X509Certificate
    
    /** An [SSLSession] that delegates all calls.  */
    abstract class DelegatingSSLSession(protected val delegate: SSLSession?) : SSLSession {
      override fun getId(): ByteArray {
        return delegate!!.id
      }
    
      override fun getSessionContext(): SSLSessionContext {
        return delegate!!.sessionContext
      }
    
      override fun getCreationTime(): Long {
        return delegate!!.creationTime
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/RequestBody.kt

              }
            }
          }
        }
    
        /** Returns a new request body that transmits this. */
        @JvmOverloads
        @JvmStatic
        @JvmName("create")
        fun ByteArray.toRequestBody(
          contentType: MediaType? = null,
          offset: Int = 0,
          byteCount: Int = size,
        ): RequestBody = commonToRequestBody(contentType, offset, byteCount)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Jan 25 14:41:37 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/-ResponseBodyCommon.kt

        throw IOException("Content-Length ($contentLength) and stream length ($size) disagree")
      }
      return bytes
    }
    
    internal fun ResponseBody.commonClose() = source().closeQuietly()
    
    internal fun ByteArray.commonToResponseBody(contentType: MediaType?): ResponseBody {
      return Buffer()
        .write(this)
        .asResponseBody(contentType, size.toLong())
    }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/FakeSSLSession.kt

      override fun getCipherSuite(): String {
        throw UnsupportedOperationException()
      }
    
      override fun getCreationTime(): Long {
        throw UnsupportedOperationException()
      }
    
      override fun getId(): ByteArray {
        throw UnsupportedOperationException()
      }
    
      override fun getLastAccessedTime(): Long {
        throw UnsupportedOperationException()
      }
    
      override fun getLocalCertificates(): Array<Certificate> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/cache2/FileOperatorTest.kt

        }
        assertFailsWith<IndexOutOfBoundsException> {
          operator.write(0, buffer, 4L)
        }
      }
    
      private fun randomByteString(byteCount: Int): ByteString {
        val bytes = ByteArray(byteCount)
        Random(0).nextBytes(bytes)
        return ByteString.of(*bytes)
      }
    
      private fun snapshot(): ByteString {
        randomAccessFile!!.getChannel().force(false)
        val source = file!!.source().buffer()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
Back to top