- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,324 for writeTo (0.18 sec)
-
okhttp/src/test/java/okhttp3/RequestBodyTest.kt
assertOnFileDescriptor(content = "Hello") { fd -> val requestBody = fd.toRequestBody() val buffer = Buffer() requestBody.writeTo(buffer) assertThat(buffer.readUtf8()).isEqualTo("Hello") assertThrows(IOException::class.java) { requestBody.writeTo(Buffer()) } } } @Test fun testFileDescriptorAfterClose() {
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.6K bytes - Viewed (1) -
okhttp/src/main/kotlin/okhttp3/internal/-RequestBodyCommon.kt
return object : RequestBody() { override fun contentType() = contentType override fun contentLength() = byteCount.toLong() override fun writeTo(sink: BufferedSink) { sink.write(this@commonToRequestBody, offset, byteCount) } } } @Suppress("unused") fun RequestBody.commonContentLength(): Long = -1L @Suppress("unused")
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.7K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/ForwardingRequestBody.kt
} @Throws(IOException::class) override fun contentLength(): Long { return delegate.contentLength() } @Throws(IOException::class) override fun writeTo(sink: BufferedSink) { delegate.writeTo(sink) } override fun isDuplex(): Boolean { return delegate.isDuplex() } override fun toString(): String { return javaClass.simpleName + "(" + delegate.toString() + ")"
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/RequestBody.kt
* ### Duplex APIs * * With regular request bodies it is not legal to write bytes to the sink passed to * [RequestBody.writeTo] after that method returns. For duplex requests bodies that condition is * lifted. Such writes occur on an application-provided thread and may occur concurrently with * reads of the [ResponseBody]. For duplex request bodies, [writeTo] should return
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Thu Jan 25 14:41:37 GMT 2024 - 9.6K bytes - Viewed (0) -
src/bufio/bufio.go
for _, fb := range full { buf.Write(fb) } buf.Write(frag) return buf.String(), err } // WriteTo implements io.WriterTo. // This may make multiple calls to the [Reader.Read] method of the underlying [Reader]. // If the underlying reader supports the [Reader.WriteTo] method, // this calls the underlying [Reader.WriteTo] without buffering. func (b *Reader) WriteTo(w io.Writer) (n int64, err error) { b.lastByte = -1
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Thu Oct 12 14:39:08 GMT 2023 - 21.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/MultipartBodyTest.kt
val buffer = Buffer() body.writeTo(buffer) assertThat(buffer.readUtf8()).isEqualTo(expected) } @Test fun streamingPartHasNoLength() { class StreamingBody(private val body: String) : RequestBody() { override fun contentType(): MediaType? { return null } @Throws(IOException::class) override fun writeTo(sink: BufferedSink) { sink.writeUtf8(body)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 10.4K bytes - Viewed (0) -
src/bytes/reader.go
} r.i = abs return abs, nil } // WriteTo implements the [io.WriterTo] interface. func (r *Reader) WriteTo(w io.Writer) (n int64, err error) { r.prevRune = -1 if r.i >= int64(len(r.s)) { return 0, nil } b := r.s[r.i:] m, err := w.Write(b) if m > len(b) { panic("bytes.Reader.WriteTo: invalid Write count") } r.i += int64(m) n = int64(m)
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Oct 13 17:10:31 GMT 2023 - 3.9K bytes - Viewed (0) -
src/bytes/reader_test.go
{"ReadByte", func(r *Reader) { r.ReadByte() }}, {"UnreadRune", func(r *Reader) { r.UnreadRune() }}, {"Seek", func(r *Reader) { r.Seek(0, io.SeekCurrent) }}, {"WriteTo", func(r *Reader) { r.WriteTo(&Buffer{}) }}, } func TestUnreadRuneError(t *testing.T) { for _, tt := range UnreadRuneErrorTests { reader := NewReader([]byte("0123456789")) if _, _, err := reader.ReadRune(); err != nil {
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Mon Dec 13 18:45:54 GMT 2021 - 8K bytes - Viewed (0) -
src/archive/tar/reader.go
} return n, err } // writeTo writes the content of the current file to w. // The bytes written matches the number of remaining bytes in the current file. // // If the current file is sparse and w is an io.WriteSeeker, // then writeTo uses Seek to skip past holes defined in Header.SparseHoles, // assuming that skipped regions are filled with NULs. // This always writes the last byte to ensure w is the right size. //
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Mar 08 01:59:14 GMT 2024 - 26.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/FormBodyTest.kt
val out = Buffer() body.writeTo(out) assertThat(out.readUtf8()).isEqualTo(expected) } @Test fun encodedPair() { val body = FormBody.Builder() .add("sim", "ple") .build() val expected = "sim=ple" assertThat(body.contentLength()).isEqualTo(expected.length.toLong()) val buffer = Buffer() body.writeTo(buffer)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 7.8K bytes - Viewed (0)