- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for WriteAll (0.09 sec)
-
okhttp/src/test/java/okhttp3/internal/http2/Http2Test.kt
writeMedium(frame, headerBytes.size.toInt()) frame.writeByte(Http2.TYPE_HEADERS) frame.writeByte(FLAG_END_HEADERS or FLAG_END_STREAM) frame.writeInt(expectedStreamId and 0x7fffffff) frame.writeAll(headerBytes) // Check writer sends the same bytes. assertThat(sendHeaderFrames(true, sentHeaders)).isEqualTo(frame) reader.nextFrame( requireSettings = false, object : BaseTestHandler() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 28.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/RequestBody.kt
override fun isOneShot(): Boolean = true override fun writeTo(sink: BufferedSink) { FileInputStream(this@toRequestBody).use { sink.buffer.writeAll(it.source()) } } } } /** Returns a new request body that transmits this. */ @JvmOverloads @JvmStatic @JvmName("create")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Jan 25 14:41:37 UTC 2024 - 9.6K bytes - Viewed (0) -
cmd/naughty-disk_test.go
return FileInfo{}, err } return d.disk.ReadVersion(ctx, origvolume, volume, path, versionID, opts) } func (d *naughtyDisk) WriteAll(ctx context.Context, volume string, path string, b []byte) (err error) { if err := d.calcError(); err != nil { return err } return d.disk.WriteAll(ctx, volume, path, b) } func (d *naughtyDisk) ReadAll(ctx context.Context, volume string, path string) (buf []byte, err error) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Aug 12 08:38:15 UTC 2024 - 10.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/ws/MessageInflater.kt
@Throws(IOException::class) fun inflate(buffer: Buffer) { require(deflatedBytes.size == 0L) if (noContextTakeover) { inflater.reset() } deflatedBytes.writeAll(buffer) deflatedBytes.writeInt(OCTETS_TO_ADD_BEFORE_INFLATION) val totalBytesToRead = inflater.bytesRead + deflatedBytes.size // We cannot read all, as the source does not close.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.8K bytes - Viewed (0) -
samples/static-server/src/main/java/okhttp3/sample/SampleServer.java
.setBody(fileToBytes(file)) .addHeader("content-type: " + contentType(path)); } private Buffer fileToBytes(File file) throws IOException { Buffer result = new Buffer(); result.writeAll(Okio.source(file)); return result; } private String contentType(String path) { if (path.endsWith(".png")) return "image/png"; if (path.endsWith(".jpg")) return "image/jpeg";
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Jan 02 02:50:44 UTC 2019 - 4.7K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt
responseHeaders = responseHeaders, outFinished = false, flushHeaders = false, ) file.source().use { source -> stream.getSink().buffer().use { sink -> sink.writeAll(source) } } } private fun contentType(file: File): String { return when { file.name.endsWith(".css") -> "text/css" file.name.endsWith(".gif") -> "image/gif"
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 6.1K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerWriter.kt
for (shift in (lengthByteCount - 1) * 8 downTo 0 step 8) { sink.writeByte((length shr shift).toInt()) } } // Write the payload. sink.writeAll(content) } /** * Execute [block] with a new namespace for type hints. Type hints from the enclosing type are no * longer usable by the current type's members. */
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 5.7K bytes - Viewed (0) -
okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt
gzippedLength = buffer.size GzipSource(buffer).use { gzippedResponseBody -> buffer = Buffer() buffer.writeAll(gzippedResponseBody) } } val charset: Charset = requestBody.contentType().charsetOrUtf8() logger.log("") if (!buffer.isProbablyUtf8()) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 06 09:14:38 UTC 2024 - 11.2K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PostStreamingWithPipe.java
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(); }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Jul 06 03:18:15 UTC 2018 - 3.1K bytes - Viewed (0) -
cmd/erasure-healing_test.go
Recursive: false, Immediate: false, }) if err != nil { t.Errorf("Failure during deleting part.1 - %v", err) } err = firstDisk.WriteAll(context.Background(), bucket, pathJoin(object, fi.DataDir, "part.1"), []byte{}) if err != nil { t.Errorf("Failure during creating part.1 - %v", err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jun 10 15:51:27 UTC 2024 - 49K bytes - Viewed (0)