- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 74 for WriteTo (0.22 sec)
-
samples/guide/src/main/java/okhttp3/recipes/kt/PostStreaming.kt
class PostStreaming { private val client = OkHttpClient() fun run() { val requestBody = 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")) } }
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.9K bytes - Viewed (0) -
cmd/admin-handlers-config-kv.go
if err != nil { writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL) return } var s strings.Builder for _, subSysConfig := range subSysConfigs { subSysConfig.WriteTo(&s, false) } password := cred.SecretKey econfigData, err := madmin.EncryptData(password, []byte(s.String())) if err != nil { writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL) return
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 15.7K bytes - Viewed (0) -
android/guava/src/com/google/common/math/PairedStats.java
* versions. */ public byte[] toByteArray() { ByteBuffer buffer = ByteBuffer.allocate(BYTES).order(ByteOrder.LITTLE_ENDIAN); xStats.writeTo(buffer); yStats.writeTo(buffer); buffer.putDouble(sumOfProductsOfDeltas); return buffer.array(); } /** * Creates a {@link PairedStats} instance from the given byte representation which was obtained by
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Fri May 12 17:02:53 GMT 2023 - 12.6K bytes - Viewed (0) -
okcurl/src/test/kotlin/okhttp3/curl/MainTest.kt
return Main().apply { parse(args.toList()) } } private fun bodyAsString(body: RequestBody?): String { return try { val buffer = Buffer() body!!.writeTo(buffer) buffer.readString(body.contentType()!!.charset()!!) } catch (e: IOException) { throw RuntimeException(e) } } }
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 4.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
url = server.url("/"), body = object : ForwardingRequestBody(transferKind.newRequestBody("def")) { override fun writeTo(sink: BufferedSink) { sinkReference.set(sink) super.writeTo(sink) } }, ), ) assertThat(readAscii(response.body.byteStream(), Int.MAX_VALUE)) .isEqualTo("abc")
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 131.7K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostStreamingWithPipe.java
public BufferedSink sink() { return sink; } @Override public MediaType contentType() { return MEDIA_TYPE_MARKDOWN; } @Override public void writeTo(BufferedSink sink) throws IOException { sink.writeAll(pipe.source()); } } public static void main(String... args) throws Exception { new PostStreamingWithPipe().run(); }
Java - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Fri Jul 06 03:18:15 GMT 2018 - 3.1K bytes - Viewed (0) -
android/guava/src/com/google/common/hash/BloomFilter.java
* has not actually been put in the {@code BloomFilter}. * * <p>Bloom filters are serializable. They also support a more compact serial representation via the * {@link #writeTo} and {@link #readFrom} methods. Both serialized forms will continue to be * supported by future versions of this library. However, serial forms generated by newer versions
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 23.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/DuplexTest.kt
override fun contentType() = delegate.contentType() override fun isDuplex() = true override fun writeTo(sink: BufferedSink) { executorService.schedule({ try { delegate.writeTo(sink) sink.close() } catch (e: IOException) { throw RuntimeException(e) } }, delayMillis, TimeUnit.MILLISECONDS)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 23.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Cache.kt
return null } val entry = Entry(response) var editor: DiskLruCache.Editor? = null try { editor = cache.edit(key(response.request.url)) ?: return null entry.writeTo(editor) return RealCacheRequest(editor) } catch (_: IOException) { abortQuietly(editor) return null } } @Throws(IOException::class)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Wed Apr 10 19:46:48 GMT 2024 - 26.8K bytes - Viewed (0) -
docs/features/interceptors.md
@Override public long contentLength() { return -1; // We don't know the compressed length in advance! } @Override public void writeTo(BufferedSink sink) throws IOException { BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); body.writeTo(gzipSink); gzipSink.close(); } }; } } ``` ### Rewriting Responses
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sun Feb 06 02:19:09 GMT 2022 - 8.1K bytes - Viewed (0)