- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 1,362 for writeTo (0.11 sec)
-
okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt
val encodedValue: String = formBody.encodedValue(0) val value: String = formBody.value(0) val contentType: MediaType = formBody.contentType() val contentLength: Long = formBody.contentLength() formBody.writeTo(Buffer()) val requestBody: RequestBody = formBody } @Test fun formBodyBuilder() { var builder: FormBody.Builder = FormBody.Builder() builder = FormBody.Builder(Charsets.UTF_8)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 01 14:21:25 UTC 2024 - 46.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RequestTest.kt
assertThat(bodyToHex(body), "Retransmit body").isEqualTo("48656c6c6f") } @Test fun file() { val file = File.createTempFile("RequestTest", "tmp") val writer = FileWriter(file) writer.write("abc") writer.close() val contentType = "text/plain".toMediaType() val body: RequestBody = file.asRequestBody(contentType) assertThat(body.contentType()).isEqualTo(contentType)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 16.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt
override fun contentLength(): Long = postBytes.size.toLong() override fun writeTo(sink: BufferedSink) { sink.write(postBytes) // push bytes into the stream's buffer sink.flush() // Http2Connection.writeData subject to write window sink.close() // Http2Connection.writeData empty frame } }, ), )
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 11 22:09:35 UTC 2024 - 75.3K bytes - Viewed (0) -
guava/src/com/google/common/math/Stats.java
* versions. */ public byte[] toByteArray() { ByteBuffer buff = ByteBuffer.allocate(BYTES).order(ByteOrder.LITTLE_ENDIAN); writeTo(buff); return buff.array(); } /** * Writes to the given {@link ByteBuffer} a byte representation of this instance. * * <p><b>Note:</b> No guarantees are made regarding stability of the representation between * versions.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 23 16:45:30 UTC 2024 - 24.9K bytes - Viewed (0) -
mockwebserver/api/mockwebserver3.api
} public final class mockwebserver3/MockResponse$Companion { } public abstract interface class mockwebserver3/MockResponseBody { public abstract fun getContentLength ()J public abstract fun writeTo (Lokio/BufferedSink;)V } public final class mockwebserver3/MockWebServer : java/io/Closeable { public static final field Companion Lmockwebserver3/MockWebServer$Companion; public fun <init> ()V public fun close ()V
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 03 21:59:45 UTC 2023 - 12.7K bytes - Viewed (0) -
docs/recipes.md
```kotlin 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")) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Fri Feb 18 08:52:22 UTC 2022 - 40.2K bytes - Viewed (0) -
src/bytes/example_test.go
buf := bytes.Buffer{} buf.Write([]byte{'h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd'}) os.Stdout.Write(buf.Bytes()) // Output: hello world } func ExampleBuffer_AvailableBuffer() { var buf bytes.Buffer for i := 0; i < 4; i++ { b := buf.AvailableBuffer() b = strconv.AppendInt(b, int64(i), 10) b = append(b, ' ') buf.Write(b) } os.Stdout.Write(buf.Bytes()) // Output: 0 1 2 3 }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt
val builder = MockResponse.Builder().body("ABC") assertThat(headersToList(builder)).containsExactly("Content-Length: 3") val response = builder.build() val body = Buffer() response.body!!.writeTo(body) assertThat(body.readUtf8()).isEqualTo("ABC") } @Test fun mockResponseAddHeader() { val builder = MockResponse.Builder() .clearHeaders()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 23.5K bytes - Viewed (0) -
api/go1.8.txt
pkg net/http, var ErrServerClosed error pkg net/http, var NoBody noBody pkg net/mail, func ParseDate(string) (time.Time, error) pkg net, method (*Buffers) Read([]uint8) (int, error) pkg net, method (*Buffers) WriteTo(io.Writer) (int64, error) pkg net, method (*Resolver) LookupAddr(context.Context, string) ([]string, error) pkg net, method (*Resolver) LookupCNAME(context.Context, string) (string, error)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Dec 21 05:25:57 UTC 2016 - 16.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/BloomFilterTest.java
BloomFilter<byte[]> bf = BloomFilter.create(funnel, 100); for (int i = 0; i < 100; i++) { bf.put(Ints.toByteArray(i)); } ByteArrayOutputStream out = new ByteArrayOutputStream(); bf.writeTo(out); BloomFilter<byte[]> read = BloomFilter.readFrom(new ByteArrayInputStream(out.toByteArray()), funnel); assertThat(read).isEqualTo(bf); assertThat(read.expectedFpp()).isGreaterThan(0); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 21.2K bytes - Viewed (0)