- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for jbyteArray (0.12 sec)
-
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()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketWriter.kt
private var writerClosed = false /** Lazily initialized on first use. */ private var messageDeflater: MessageDeflater? = null // Masks are only a concern for client writers. private val maskKey: ByteArray? = if (isClient) ByteArray(4) else null private val maskCursor: Buffer.UnsafeCursor? = if (isClient) Buffer.UnsafeCursor() else null /** Send a ping with the supplied [payload]. */ @Throws(IOException::class)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.9K bytes - Viewed (0) -
guava/src/com/google/common/hash/AbstractNonStreamingHashFunction.java
} @Override public Hasher putBytes(ByteBuffer bytes) { stream.write(bytes); return this; } @Override public HashCode hash() { return hashBytes(stream.byteArray(), 0, stream.length()); } } // Just to access the byte[] without introducing an unnecessary copy private static final class ExposedByteArrayOutputStream extends ByteArrayOutputStream {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Apr 20 18:43:59 UTC 2021 - 3.8K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.8K bytes - Viewed (0) -
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() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 30 06:23:33 UTC 2024 - 5.1K bytes - Viewed (0) -
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)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0) -
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()) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-RequestBodyCommon.kt
*/ @file:Suppress("ktlint:standard:filename") package okhttp3.internal import okhttp3.MediaType import okhttp3.RequestBody import okio.BufferedSink import okio.ByteString fun ByteArray.commonToRequestBody( contentType: MediaType?, offset: Int, byteCount: Int, ): RequestBody { checkOffsetAndCount(size.toLong(), offset.toLong(), byteCount.toLong()) return object : RequestBody() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/HuffmanTest.kt
val s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" for (i in s.indices) { assertRoundTrip(s.substring(0, i).encodeUtf8()) } val random = Random(123456789L) val buf = ByteArray(4096) random.nextBytes(buf) assertRoundTrip(buf.toByteString()) } private fun assertRoundTrip(data: ByteString) { val encodeBuffer = Buffer() encode(data, encodeBuffer)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Jan 04 05:32:07 UTC 2024 - 1.8K bytes - Viewed (0) -
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()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.8K bytes - Viewed (0)