- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for readFrom (0.06 sec)
-
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) -
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/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) -
android/guava/src/com/google/common/hash/BloomFilter.java
* has not actually been put in the {@code BloomFilter}. * * <p>Bloom filters are serializable. They also support a more compact serial representation via the * {@link #writeTo} and {@link #readFrom} methods. Both serialized forms will continue to be * supported by future versions of this library. However, serial forms generated by newer versions
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 23 16:45:30 UTC 2024 - 26.6K bytes - Viewed (0) -
guava/src/com/google/common/math/Stats.java
checkNotNull(byteArray); checkArgument( byteArray.length == BYTES, "Expected Stats.BYTES = %s remaining , got %s", BYTES, byteArray.length); return readFrom(ByteBuffer.wrap(byteArray).order(ByteOrder.LITTLE_ENDIAN)); } /** * Creates a Stats instance from the byte representation read from the given {@link ByteBuffer}. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 23 16:45:30 UTC 2024 - 24.9K 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)