- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 34 for readByteString (0.24 sec)
-
samples/guide/src/main/java/okhttp3/recipes/PrintEventsNonConcurrent.java
// Consume and discard the response body. response.body().source().readByteString(); } System.out.println("REQUEST 2 (pooled connection)"); try (Response response = client.newCall(request).execute()) { // Consume and discard the response body. response.body().source().readByteString(); } } public static void main(String... args) throws Exception {
Java - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sun Feb 16 23:20:49 GMT 2020 - 5.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt
} source.close() buffer.readByteString() } } private fun assertFile( prefix: ByteString, upstreamSize: Long, metadataSize: Int, upstream: String?, metadata: ByteString?, ) { val source = file.source().buffer() assertThat(source.readByteString(prefix.size.toLong())).isEqualTo(prefix)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 8.1K bytes - Viewed (0) -
okhttp/src/main/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)) }
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 22.5K bytes - Viewed (1) -
okhttp-testing-support/src/main/kotlin/okhttp3/UppercaseResponseInterceptor.kt
sink: Buffer, byteCount: Long, ): Long { val buffer = Buffer() val read = delegate.read(buffer, byteCount) if (read != -1L) { sink.write(buffer.readByteString().toAsciiUppercase()) } return read } } }
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketWriterTest.kt
*/ @RegisterExtension val noDataLeftBehind = AfterEachCallback { context: ExtensionContext -> if (context.executionException.isPresent) return@AfterEachCallback assertThat(data.readByteString().hex(), "Data not empty") .isEqualTo("") } // Mutually exclusive. Use the one corresponding to the peer whose behavior you wish to test. private val serverWriter = WebSocketWriter(
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 9.3K 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()
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 31.7K bytes - Viewed (0) -
okhttp/src/main/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 = ""
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 9.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/MessageDeflaterInflaterTest.kt
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sat Jan 06 05:31:00 GMT 2024 - 5K 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 {
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 10.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-ResponseBodyCommon.kt
import okio.use internal fun ResponseBody.commonBytes() = commonConsumeSource(BufferedSource::readByteArray) { it.size } internal fun ResponseBody.commonByteString() = commonConsumeSource(BufferedSource::readByteString) { it.size } internal inline fun <T : Any> ResponseBody.commonConsumeSource( consumer: (BufferedSource) -> T, sizeMapper: (T) -> Int, ): T { val contentLength = contentLength()
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.3K bytes - Viewed (0)