- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 39 for write2 (0.12 sec)
-
src/bytes/buffer.go
m, e := w.Write(b.buf[b.off:]) if m > nBytes { panic("bytes.Buffer.WriteTo: invalid Write count") } b.off += m n = int64(m) if e != nil { return n, e } // all bytes should have been written, by definition of // Write method in io.Writer if m != nBytes { return n, io.ErrShortWrite } } // Buffer is now empty; reset. b.Reset() return n, nil }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Oct 29 16:47:05 UTC 2024 - 15.7K bytes - Viewed (0) -
src/bufio/bufio_test.go
continue } if e := buf.Flush(); e != nil { t.Errorf("%s: buf.Flush = %v", context, e) } written := w.Bytes() if len(written) != nwrite { t.Errorf("%s: %d bytes written", context, len(written)) } for l := 0; l < len(written); l++ { if written[l] != data[l] { t.Errorf("wrong bytes written") t.Errorf("want=%q", data[:len(written)])
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0) -
android/guava/src/com/google/common/io/CharSink.java
* @since 15.0 (in 14.0 with return type {@link BufferedWriter}) */ public Writer openBufferedStream() throws IOException { Writer writer = openStream(); return (writer instanceof BufferedWriter) ? (BufferedWriter) writer : new BufferedWriter(writer); } /** * Writes the given character sequence to this sink. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 6.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CharSinkTest.java
public void setUp() { sink = new TestCharSink(); } public void testOpenBufferedStream() throws IOException { Writer writer = sink.openBufferedStream(); assertTrue(sink.wasStreamOpened()); assertFalse(sink.wasStreamClosed()); writer.write(STRING); writer.close(); assertTrue(sink.wasStreamClosed()); assertEquals(STRING, sink.getString()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 4.5K bytes - Viewed (0) -
src/bufio/example_test.go
b = append(b, ' ') w.Write(b) } w.Flush() // Output: 1 2 3 4 } // ExampleWriter_ReadFrom demonstrates how to use the ReadFrom method of Writer. func ExampleWriter_ReadFrom() { var buf bytes.Buffer writer := bufio.NewWriter(&buf) data := "Hello, world!\nThis is a ReadFrom example." reader := strings.NewReader(data) n, err := writer.ReadFrom(reader) if err != nil {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 5.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CharSourceTest.java
assertFalse(source.wasStreamClosed()); StringWriter writer = new StringWriter(); char[] buf = new char[64]; int read; while ((read = reader.read(buf)) != -1) { writer.write(buf, 0, read); } reader.close(); writer.close(); assertTrue(source.wasStreamClosed()); assertEquals(STRING, writer.toString()); } public void testLines() throws IOException {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 11.4K bytes - Viewed (0) -
guava/src/com/google/common/io/CharSource.java
} @Override public long copyTo(CharSink sink) throws IOException { checkNotNull(sink); Closer closer = Closer.create(); try { Writer writer = closer.register(sink.openStream()); writer.write((String) seq); return seq.length(); } catch (Throwable e) { throw closer.rethrow(e); } finally { closer.close(); } } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 31 14:20:11 UTC 2024 - 25.5K bytes - Viewed (0) -
cmd/erasure-object.go
inlineBuffers[i] = bytes.NewBuffer(buf[:0]) defer grid.PutByteBuffer(buf) writers[i] = newStreamingBitrotWriterBuffer(inlineBuffers[i], DefaultBitrotAlgorithm, erasure.ShardSize()) } } n, erasureErr := erasure.Encode(ctx, data, writers, buffer, writeQuorum) closeBitrotWriters(writers) if erasureErr != nil { return ObjectInfo{}, toObjectErr(erasureErr, minioMetaBucket, key) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 22:10:24 UTC 2024 - 78.8K bytes - Viewed (0) -
cmd/api-response.go
mimeXML mimeType = "application/xml" ) // writeSuccessResponseJSON writes success headers and response if any, // with content-type set to `application/json`. func writeSuccessResponseJSON(w http.ResponseWriter, response []byte) { writeResponse(w, http.StatusOK, response, mimeJSON) } // writeSuccessResponseXML writes success headers and response if any, // with content-type set to `application/xml`.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 19:27:06 UTC 2024 - 33.4K bytes - Viewed (0) -
.github/workflows/scorecards-analysis.yml
name: Scorecards analysis runs-on: ubuntu-latest permissions: # Needed to upload the results to code-scanning dashboard. security-events: write # Needed to publish results and get a badge (see publish_results below). id-token: write steps: - name: "Checkout code" uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with:
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Fri Nov 01 08:40:10 UTC 2024 - 2.6K bytes - Viewed (0)