Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 42 for ByteArray (1.93 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt

     */
    internal fun canonicalizeInetAddress(address: ByteArray): ByteArray {
      return when {
        isMappedIpv4Address(address) -> address.sliceArray(12 until 16)
        else -> address
      }
    }
    
    /** Returns true for IPv6 addresses like `0000:0000:0000:0000:0000:ffff:XXXX:XXXX`. */
    private fun isMappedIpv4Address(address: ByteArray): Boolean {
      if (address.size != 16) return false
    
      for (i in 0 until 10) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt

      // PublicSuffixListGenerator class for how these lists are generated.
      // Guarded by this.
      private lateinit var publicSuffixListBytes: ByteArray
      private lateinit var publicSuffixExceptionListBytes: ByteArray
    
      /**
       * Returns the effective top-level domain plus one (eTLD+1) by referencing the public suffix list.
       * Returns null if the domain is a public suffix or a private address.
       *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.7K 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. build-logic/kotlin-dsl-shared-runtime/src/main/kotlin/org/gradle/kotlin/dsl/internal/sharedruntime/support/ClassBytesRepository.kt

     */
    
    package org.gradle.kotlin.dsl.internal.sharedruntime.support
    
    import java.io.Closeable
    import java.io.File
    import java.util.jar.JarFile
    
    
    private
    typealias ClassBytesSupplier = () -> ByteArray
    
    
    private
    typealias ClassBytesIndex = (String) -> ClassBytesSupplier?
    
    
    /**
     * Repository providing access to class bytes by Kotlin source names.
     *
    Plain Text
    - Registered: Wed Feb 28 11:36:09 GMT 2024
    - Last Modified: Sat Sep 30 16:17:27 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/http2/Http2Test.kt

        }
      }
    
      @Test fun readPaddedDataFrame() {
        val dataLength = 1123
        val expectedData = ByteArray(dataLength)
        Arrays.fill(expectedData, 2.toByte())
        val paddingLength = 254
        val padding = ByteArray(paddingLength)
        Arrays.fill(padding, 0.toByte())
        writeMedium(frame, dataLength + paddingLength + 1)
        frame.writeByte(Http2.TYPE_DATA)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 28.1K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt

            .body(
              Buffer()
                .write(ByteArray(responseBodySize)),
            )
            .throttleBody(64 * 1024, 125, MILLISECONDS) // 500 Kbps
            .build(),
        )
        val call = client.newCall(Request(server.url("/")))
        val response = call.execute()
        cancelLater(call, 500)
        val responseBody = response.body.byteStream()
        val buffer = ByteArray(1024)
        assertFailsWith<IOException> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. docs/changelogs/upgrading_to_okhttp_4.md

    | MediaType.get(String)               | String.toMediaType()            |
    | MediaType.parse(String)             | String.toMediaTypeOrNull()      |
    | RequestBody.create(ByteArray)       | ByteArray.toRequestBody()       |
    | RequestBody.create(ByteString)      | ByteString.toRequestBody()      |
    | RequestBody.create(File)            | File.asRequestBody()            |
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 16:58:16 GMT 2022
    - 10.9K bytes
    - Viewed (0)
  10. 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)
Back to top