- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for readByteString (0.32 sec)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Hpack.kt
val name = getName(index) val value = readByteString() headerList.add(Header(name, value)) } @Throws(IOException::class) private fun readLiteralHeaderWithoutIndexingNewName() { val name = checkLowercase(readByteString()) val value = readByteString() headerList.add(Header(name, value)) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon May 05 16:01:00 UTC 2025 - 22.4K bytes - Viewed (0) -
okhttp-tls/src/test/java/okhttp3/tls/internal/der/DerTest.kt
val derWriter = DerWriter(buffer) derWriter.write("test", tagClass = DerHeader.TAG_CLASS_UNIVERSAL, tag = 30L) { derWriter.writeUtf8("a".repeat(201)) } assertThat(buffer.readByteString(3)).isEqualTo("1e81c9".decodeHex()) assertThat(buffer.readUtf8()).isEqualTo("a".repeat(201)) } @Test fun `decode primitive bit string`() { val buffer = Buffer()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 31.7K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt
val byteString = source.readByteString(bytesLeft) return BitString(byteString, unusedBitCount) } fun readOctetString(): ByteString { if (bytesLeft == -1L || constructed) { throw ProtocolException("constructed octet strings not supported for DER") } return source.readByteString(bytesLeft) } fun readUtf8String(): String {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 10.5K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/WebSocketReader.kt
maskCursor.close() } } when (opcode) { OPCODE_CONTROL_PING -> { frameCallback.onReadPing(controlFrameBuffer.readByteString()) } OPCODE_CONTROL_PONG -> { frameCallback.onReadPong(controlFrameBuffer.readByteString()) } OPCODE_CONTROL_CLOSE -> { var code = CLOSE_NO_STATUS_CODE var reason = ""
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Jul 29 22:04:11 UTC 2025 - 9.9K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache2/Relay.kt
val fileOperator = FileOperator(randomAccessFile.channel) // Read the header. val header = Buffer() fileOperator.read(0, header, FILE_HEADER_SIZE) val prefix = header.readByteString(PREFIX_CLEAN.size.toLong()) if (prefix != PREFIX_CLEAN) throw IOException("unreadable cache file") val upstreamSize = header.readLong() val metadataSize = header.readLong()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed May 28 17:15:47 UTC 2025 - 11.8K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2Reader.kt
throw IOException("Required SETTINGS preface not received") } } else { // The server reads the CONNECTION_PREFACE byte string. val connectionPreface = source.readByteString(CONNECTION_PREFACE.size.toLong()) if (logger.isLoggable(FINE)) logger.fine(format("<< CONNECTION ${connectionPreface.hex()}")) if (CONNECTION_PREFACE != connectionPreface) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Dec 27 13:39:56 UTC 2024 - 19.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HpackTest.kt
.writeByte(3) // String literal not Huffman encoded (len = 3). .writeByte('b'.code) .writeByte('a'.code) .writeByte('r'.code) .readByteString() val actual = bytesOut.readByteString() assertThat(actual).isEqualTo(expected) } @Test fun staticTableIndexedHeaders() { hpackWriter!!.writeHeaders(headerEntries(":method", "GET"))
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 38.6K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/ResponseBody.kt
* may trigger an [OutOfMemoryError]. Prefer to stream the response body if this is a * possibility for your response. */ @Throws(IOException::class) fun byteString() = consumeSource(BufferedSource::readByteString) { it.size } private inline fun <T : Any> ResponseBody.consumeSource( consumer: (BufferedSource) -> T, sizeMapper: (T) -> Int, ): T { val contentLength = contentLength()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue May 27 14:51:25 UTC 2025 - 11.6K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/Http2Test.kt
) { assertThat(inFinished).isFalse() assertThat(streamId).isEqualTo(expectedStreamId) assertThat(length).isEqualTo(Http2.INITIAL_MAX_FRAME_SIZE) val data = source.readByteString(length.toLong()) for (b in data.toByteArray()) { assertThat(b).isEqualTo(2.toByte()) } } }, ) } @Test fun dataFrameNotAssociateWithStream() {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 28.1K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
requestLine = request, headers = headers.build(), chunkSizes = chunkSizes, bodySize = requestBody.receivedByteCount, body = when { hasBody -> requestBody.buffer.readByteString() else -> null }, connectionIndex = connectionIndex, exchangeIndex = exchangeIndex, socket = socket, failure = failure, ) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 02 20:36:00 UTC 2025 - 40.3K bytes - Viewed (0)