- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 35 for writeUtf8 (0.05 sec)
-
okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt
val future1 = executor.submit(sourceReader(relay.newSource())) val future2 = executor.submit(sourceReader(relay.newSource())) Thread.sleep(500) sink.writeUtf8("abcdefghij") Thread.sleep(500) sink.writeUtf8("klmnopqrst") sink.close() assertThat<ByteString>(future1.get()) .isEqualTo("abcdefghijklmnopqrst".encodeUtf8()) assertThat<ByteString>(future2.get())
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 8.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/cache2/FileOperatorTest.kt
randomAccessFile!!.getChannel(), ) val bufferA = Buffer() val bufferB = Buffer() bufferA.writeUtf8("Dodgson!\n") operatorA.write(0, bufferA, 9) bufferB.writeUtf8("You shouldn't use my name.\n") operatorB.write(9, bufferB, 27) bufferA.writeUtf8("Dodgson, we've got Dodgson here!\n") operatorA.write(36, bufferA, 33) operatorB.read(0, bufferB, 9)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.8K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/kt/PostStreaming.kt
object : RequestBody() { override fun contentType() = MEDIA_TYPE_MARKDOWN override fun writeTo(sink: BufferedSink) { sink.writeUtf8("Numbers\n") sink.writeUtf8("-------\n") for (i in 2..997) { sink.writeUtf8(String.format(" * $i = ${factor(i)}\n")) } } private fun factor(n: Int): String { for (i in 2 until n) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.9K bytes - Viewed (0) -
okhttp-logging-interceptor/src/test/java/okhttp3/logging/IsProbablyUtf8Test.kt
class IsProbablyUtf8Test { @Test fun isProbablyUtf8() { assertThat(Buffer().isProbablyUtf8()).isTrue() assertThat(Buffer().writeUtf8("abc").isProbablyUtf8()).isTrue() assertThat(Buffer().writeUtf8("new\r\nlines").isProbablyUtf8()).isTrue() assertThat(Buffer().writeUtf8("white\t space").isProbablyUtf8()).isTrue() assertThat(Buffer().writeByte(0x80).isProbablyUtf8()).isTrue()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Dec 20 23:27:07 UTC 2023 - 1.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java
return MEDIA_TYPE_MARKDOWN; } @Override public void writeTo(BufferedSink sink) throws IOException { sink.writeUtf8("Numbers\n"); sink.writeUtf8("-------\n"); for (int i = 2; i <= 997; i++) { sink.writeUtf8(String.format(" * %s = %s\n", i, factor(i))); } } private String factor(int n) { for (int i = 2; i < n; i++) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Jul 06 03:18:15 UTC 2018 - 2.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/url/-Url.kt
// Skip this character. } else if (codePoint == ' '.code && encodeSet === FORM_ENCODE_SET) { // Encode ' ' as '+'. writeUtf8("+") } else if (codePoint == '+'.code && plusIsSpace) { // Encode '+' as '%2B' since we permit ' ' to be encoded as either '+' or '%20'. writeUtf8(if (alreadyEncoded) "+" else "%2B") } else if (codePoint < 0x20 || codePoint == 0x7f || codePoint >= 0x80 && !unicodeAllowed ||
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 09 12:33:05 UTC 2024 - 7.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/MultipartReader.kt
Buffer() .writeUtf8("--") .writeUtf8(boundary) .readByteString() /** * This delimiter typically precedes all subsequent parts. It may also precede the first part * if the body contains a preamble. */ private val crlfDashDashBoundary = Buffer() .writeUtf8("\r\n--") .writeUtf8(boundary) .readByteString()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.1K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt
sink.write(bitString.byteString) } fun writeOctetString(byteString: ByteString) { sink().write(byteString) } fun writeUtf8(value: String) { sink().writeUtf8(value) } fun writeObjectIdentifier(s: String) { val utf8 = Buffer().writeUtf8(s) val v1 = utf8.readDecimalLong() require(utf8.readByte() == '.'.code.toByte()) val v2 = utf8.readDecimalLong()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.7K bytes - Viewed (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt
bytesOut.writeUtf8("\r\n") bytesOut.write(body, chunkSize) bytesOut.writeUtf8("\r\n") } bytesOut.writeUtf8("0\r\n") // Last chunk. Trailers follow! this.body = bytesOut } fun setChunkedBody( body: String, maxChunkSize: Int, ): MockResponse = setChunkedBody(Buffer().writeUtf8(body), maxChunkSize) @JvmName("-deprecated_getHeaders")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostStreamingWithPipe.java
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Jul 06 03:18:15 UTC 2018 - 3.1K bytes - Viewed (0)