Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for WriteTo (0.05 sec)

  1. src/bufio/bufio_test.go

    	br := NewReader(strings.NewReader("example"))
    	br.WriteTo(io.Discard)
    	if err := br.UnreadRune(); err == nil {
    		t.Error("UnreadRune didn't fail after WriteTo")
    	}
    }
    
    func TestNoUnreadByteAfterWriteTo(t *testing.T) {
    	br := NewReader(strings.NewReader("example"))
    	br.WriteTo(io.Discard)
    	if err := br.UnreadByte(); err == nil {
    		t.Error("UnreadByte didn't fail after WriteTo")
    	}
    }
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Nov 01 21:52:12 UTC 2024
    - 51.6K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/EventListenerTest.kt

        override fun contentType(): MediaType? {
          return "text/plain".toMediaType()
        }
    
        override fun contentLength(): Long {
          return chunk!!.size * 8L
        }
    
        override fun writeTo(sink: BufferedSink) {
          try {
            var i = 0
            while (i < contentLength()) {
              sink.write(chunk!!)
              sink.flush()
              Thread.sleep(100)
              i += chunk.size
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 56.9K bytes
    - Viewed (2)
  3. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

              url = server.url("/foo"),
              body =
                object : RequestBody() {
                  override fun contentType(): MediaType = "text/plain; charset=utf-8".toMediaType()
    
                  override fun writeTo(sink: BufferedSink) {
                    sink.write(postBytes)
                  }
                },
            ),
          )
        val response = call.execute()
        assertThat(response.body.string()).isEqualTo("ABCDE")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 11 22:09:35 UTC 2024
    - 75.3K bytes
    - Viewed (0)
  4. okhttp/api/okhttp.api

    	public final fun encodedValue (I)Ljava/lang/String;
    	public final fun name (I)Ljava/lang/String;
    	public final fun size ()I
    	public final fun value (I)Ljava/lang/String;
    	public fun writeTo (Lokio/BufferedSink;)V
    }
    
    public final class okhttp3/FormBody$Builder {
    	public fun <init> ()V
    	public fun <init> (Ljava/nio/charset/Charset;)V
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 13:41:01 UTC 2024
    - 70.2K bytes
    - Viewed (0)
  5. docs/changelogs/changelog_3x.md

        This simple option dramatically changes the behavior of the request body and of the entire
        call.
    
        The `RequestBody.writeTo()` method may now retain a reference to the provided sink and
        hand it off to another thread to write to it after `writeTo` returns.
    
        The `EventListener` may now see requests and responses interleaved in ways not previously
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Feb 06 14:55:54 UTC 2022
    - 50.8K bytes
    - Viewed (0)
  6. cmd/xl-storage_test.go

    	reader := bytes.NewReader(data)
    	for {
    		// Using io.Copy instead of this loop will not work for us as io.Copy
    		// will use bytes.Reader.WriteTo() which will not do shardSize'ed writes
    		// causing error.
    		n, err := reader.Read(shard)
    		w.Write(shard[:n])
    		if err == nil {
    			continue
    		}
    		if err == io.EOF {
    			break
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 66.7K bytes
    - Viewed (0)
Back to top