Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 65 for WriteTo (0.19 sec)

  1. 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);
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 21.3K bytes
    - Viewed (0)
  2. internal/config/config.go

    			b.WriteString(ep.Value)
    			b.WriteString(KvNewline)
    		}
    	}
    }
    
    // WriteTo writes the string representation of the configuration to the given
    // builder. When off is true, adds a comment character before the config system
    // output. It also ignores values when empty and deprecated.
    func (cs *SubsysInfo) WriteTo(b *strings.Builder, off bool) {
    	cs.AddEnvString(b)
    	if off {
    		b.WriteString(KvComment)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Mar 02 05:11:03 GMT 2024
    - 37.3K bytes
    - Viewed (0)
  3. 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"))
                }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Feb 18 08:52:22 GMT 2022
    - 40.2K bytes
    - Viewed (1)
  4. 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()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/RequestTest.kt

            " cookie:██," +
            " set-cookie:██," +
            " user-agent:OkHttp" +
            "]}",
        )
      }
    
      private fun bodyToHex(body: RequestBody): String {
        val buffer = Buffer()
        body.writeTo(buffer)
        return buffer.readByteString().hex()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.4K bytes
    - Viewed (0)
  6. internal/grid/connection.go

    			PutByteBuffer(toSend)
    			err = conn.SetWriteDeadline(time.Now().Add(connWriteTimeout))
    			if err != nil {
    				gridLogIf(ctx, fmt.Errorf("conn.SetWriteDeadline: %w", err))
    				return
    			}
    			_, err = buf.WriteTo(conn)
    			if err != nil {
    				gridLogIf(ctx, fmt.Errorf("ws write: %w", err))
    				return
    			}
    			continue
    		}
    
    		// Merge entries and send
    		queue = append(queue, toSend)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 42.6K bytes
    - Viewed (0)
  7. src/bytes/example_test.go

    	"fmt"
    	"io"
    	"os"
    	"sort"
    	"strconv"
    	"unicode"
    )
    
    func ExampleBuffer() {
    	var b bytes.Buffer // A Buffer needs no initialization.
    	b.Write([]byte("Hello "))
    	fmt.Fprintf(&b, "world!")
    	b.WriteTo(os.Stdout)
    	// Output: Hello world!
    }
    
    func ExampleBuffer_reader() {
    	// A Buffer can turn a string or a []byte into an io.Reader.
    	buf := bytes.NewBufferString("R29waGVycyBydWxlIQ==")
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  8. android/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);
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Nov 09 22:49:56 GMT 2023
    - 21.3K bytes
    - Viewed (0)
  9. 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
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
  10. 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
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 14:55:54 GMT 2022
    - 50.8K bytes
    - Viewed (0)
Back to top