- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for readForm (0.1 sec)
-
internal/http/response-recorder.go
var ErrNotImplemented = errors.New("not implemented") // ReadFrom implements support for calling internal io.ReaderFrom implementations // returns an error if the underlying ResponseWriter does not implement io.ReaderFrom func (lrw *ResponseRecorder) ReadFrom(r io.Reader) (int64, error) { if lrw.ReaderFrom != nil { n, err := lrw.ReaderFrom.ReadFrom(r) lrw.bytesWritten += int(n) return n, err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 24 17:13:00 UTC 2024 - 5.5K bytes - Viewed (0) -
src/bufio/example_test.go
// 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 { fmt.Println("ReadFrom Error:", err) return } if err = writer.Flush(); 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) -
compat/maven-model-builder/src/test/java/org/apache/maven/model/building/DefaultModelBuilderFactoryTest.java
ModelBuilder builder = new DefaultModelBuilderFactory().newInstance(); assertNotNull(builder); File pom = getPom("simple"); String originalExists = readPom(pom).getProfiles().get(1).getActivation().getFile().getExists(); DefaultModelBuildingRequest request = new DefaultModelBuildingRequest(); request.setProcessPlugins(true); request.setPomFile(pom);
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 3.6K bytes - Viewed (0) -
src/archive/tar/writer_test.go
} case testReadFrom: f := &testFile{ops: tf.ops} got, err := tw.readFrom(f) if _, ok := err.(testError); ok { t.Errorf("test %d, ReadFrom(): %v", i, err) } else if got != tf.wantCnt || !equalError(err, tf.wantErr) { t.Errorf("test %d, ReadFrom() = (%d, %v), want (%d, %v)", i, got, err, tf.wantCnt, tf.wantErr) } if len(f.ops) > 0 {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Sep 23 14:32:33 UTC 2024 - 39.4K bytes - Viewed (0) -
src/bufio/bufio_test.go
n, err := w.Write([]byte("0123456789")) if n != 10 || err != nil { t.Fatalf("Write returned (%v, %v), want (10, nil)", n, err) } // Use ReadFrom to read in some data. n2, err := w.ReadFrom(strings.NewReader("abcdef")) if n2 != 6 || err != nil { t.Fatalf("ReadFrom returned (%v, %v), want (6, nil)", n2, err) } } type emptyThenNonEmptyReader struct { r io.Reader n int }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0) -
src/archive/tar/writer.go
if err != nil && err != ErrWriteTooLong { tw.err = err } return n, err } // readFrom populates the content of the current file by reading from r. // The bytes read must match the number of remaining bytes in the current file. // // If the current file is sparse and r is an io.ReadSeeker, // then readFrom uses Seek to skip past holes defined in Header.SparseHoles, // assuming that skipped regions are all NULs.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Oct 02 14:22:59 UTC 2024 - 19.6K bytes - Viewed (0) -
src/bytes/buffer.go
} // MinRead is the minimum slice size passed to a [Buffer.Read] call by // [Buffer.ReadFrom]. As long as the [Buffer] has at least MinRead bytes beyond // what is required to hold the contents of r, [Buffer.ReadFrom] will not grow the // underlying buffer. const MinRead = 512 // ReadFrom reads data from r until EOF and appends it to the buffer, growing
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.go
n := copy(b.buf[b.n:], s) b.n += n nn += n return nn, nil } // ReadFrom implements [io.ReaderFrom]. If the underlying writer // supports the ReadFrom method, this calls the underlying ReadFrom. // If there is buffered data and an underlying ReadFrom, this fills // the buffer and writes it before calling ReadFrom. func (b *Writer) ReadFrom(r io.Reader) (n int64, err error) { if b.err != nil { return 0, b.err }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0) -
src/bytes/buffer_test.go
func TestReadFromPanicReader(t *testing.T) { // First verify non-panic behaviour var buf Buffer i, err := buf.ReadFrom(panicReader{}) if err != nil { t.Fatal(err) } if i != 0 { t.Fatalf("unexpected return from bytes.ReadFrom (1): got: %d, want %d", i, 0) } check(t, "TestReadFromPanicReader (1)", &buf, "") // Confirm that when Reader panics, the empty buffer remains empty
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0) -
guava/src/com/google/common/math/PairedStats.java
"Expected PairedStats.BYTES = %s, got %s", BYTES, byteArray.length); ByteBuffer buffer = ByteBuffer.wrap(byteArray).order(ByteOrder.LITTLE_ENDIAN); Stats xStats = Stats.readFrom(buffer); Stats yStats = Stats.readFrom(buffer); double sumOfProductsOfDeltas = buffer.getDouble(); return new PairedStats(xStats, yStats, sumOfProductsOfDeltas); } private static final long serialVersionUID = 0;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri May 12 17:02:53 UTC 2023 - 12.6K bytes - Viewed (0)