- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 139 for discard (0.16 sec)
-
build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/docbook/HtmlToXmlJavadocLexerTest.groovy
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Wed Dec 09 08:14:05 UTC 2020 - 6.5K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/PrintEvents.java
} @Override public void onResponse(Call call, Response response) throws IOException { try (ResponseBody body = response.body()) { // Consume and discard the response body. body.source().readByteString(); } } }); Request newYorkTimesRequest = new Request.Builder() .url("https://www.nytimes.com/") .build();
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 16 23:20:49 UTC 2020 - 6.1K bytes - Viewed (0) -
internal/ioutil/ioutil_test.go
} } func TestCloseOnWriter(t *testing.T) { writer := WriteOnClose(io.Discard) if writer.HasWritten() { t.Error("WriteOnCloser must not be marked as HasWritten") } writer.Write(nil) if !writer.HasWritten() { t.Error("WriteOnCloser must be marked as HasWritten") } writer = WriteOnClose(io.Discard) writer.Close() if !writer.HasWritten() { t.Error("WriteOnCloser must be marked as HasWritten")
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 22 23:07:14 UTC 2024 - 5.5K bytes - Viewed (0) -
src/archive/zip/fuzz_test.go
continue } } // If we were unable to read anything out of the archive don't // bother trying to roundtrip it. if len(files) == 0 { return } w := NewWriter(io.Discard) for _, f := range files { ww, err := w.CreateHeader(f.header) if err != nil { t.Fatalf("unable to write previously parsed header: %s", err) } if _, err := ww.Write(f.content); err != nil {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Jan 13 18:06:33 UTC 2022 - 1.7K bytes - Viewed (0) -
src/bufio/bufio.go
} } return b.buf[b.r : b.r+n], err } // Discard skips the next n bytes, returning the number of bytes discarded. // // If Discard skips fewer than n bytes, it also returns an error. // If 0 <= n <= b.Buffered(), Discard is guaranteed to succeed without // reading from the underlying io.Reader. func (b *Reader) Discard(n int) (discarded int, err error) { if n < 0 { return 0, ErrNegativeCount }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0) -
docs/features/events.md
System.out.println("REQUEST 1 (new connection)"); try (Response response = client.newCall(request).execute()) { // Consume and discard the response body. response.body().source().readByteString(); } System.out.println("REQUEST 2 (pooled connection)"); try (Response response = client.newCall(request).execute()) { // Consume and discard the response body. response.body().source().readByteString(); } ```
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Feb 06 02:19:09 UTC 2022 - 7.7K bytes - Viewed (0) -
internal/hash/reader_test.go
if err != nil { t.Fatal(err) } _, err = io.Copy(io.Discard, r) if err != nil { t.Fatal(err) } md5sum := r.MD5Current() if hex.EncodeToString(md5sum) != "e2fc714c4727ee9395f324cd2e7f331f" {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 18 17:00:54 UTC 2023 - 10.3K bytes - Viewed (0) -
cmd/streaming-v4-unsigned.go
// The s3ChunkedReader returns io.EOF when the final 0-length chunk is read. func newUnsignedV4ChunkedReader(req *http.Request, trailer bool) (io.ReadCloser, APIErrorCode) { if trailer { // Discard anything unsigned. req.Trailer = make(http.Header) trailers := req.Header.Values(awsTrailerHeader) for _, key := range trailers { req.Trailer.Add(key, "") } } else { req.Trailer = nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat May 06 02:53:12 UTC 2023 - 6.1K bytes - Viewed (0) -
cmd/admin-handlers-site-replication.go
} // SiteReplicationDevNull - everything goes to io.Discard // [POST] /minio/admin/v3/site-replication/devnull func (a adminAPIHandlers) SiteReplicationDevNull(w http.ResponseWriter, r *http.Request) { ctx := r.Context() globalSiteNetPerfRX.Connect() defer globalSiteNetPerfRX.Disconnect() connectTime := time.Now() for { n, err := io.CopyN(xioutil.Discard, r.Body, 128*humanize.KiByte)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 19.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Settings.kt
} fun clear() { set = 0 values.fill(0) } operator fun set( id: Int, value: Int, ): Settings { if (id < 0 || id >= values.size) { return this // Discard unknown settings. } val bit = 1 shl id set = set or bit values[id] = value return this } /** Returns true if a value has been assigned for the setting `id`. */
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.8K bytes - Viewed (0)