- Sort Score
- Result 10 results
- Languages All
Results 161 - 170 of 440 for readFull (0.16 sec)
-
android/guava-tests/test/com/google/common/io/CharSequenceReaderTest.java
CharSequenceReader reader = new CharSequenceReader(string); assertTrue(reader.markSupported()); assertEquals(string, readFully(reader)); assertFullyRead(reader); // reset and read again reader.reset(); assertEquals(string, readFully(reader)); assertFullyRead(reader); // reset, skip, mark, then read the rest reader.reset(); assertEquals(5, reader.skip(5));
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 6.5K bytes - Viewed (0) -
src/compress/gzip/gzip_test.go
t.Fatalf("NewReader: %v", err) } if want := (Header{OS: 255}); !reflect.DeepEqual(r.Header, want) { t.Errorf("Header mismatch:\ngot %#v\nwant %#v", r.Header, want) } b, err := io.ReadAll(r) if err != nil { t.Fatalf("ReadAll: %v", err) } if len(b) != 0 { t.Fatalf("got %d bytes, want 0", len(b)) } if err := r.Close(); err != nil { t.Fatalf("Reader.Close: %v", err) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 11 17:10:06 UTC 2024 - 6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/LittleEndianDataOutputStreamTest.java
/* Setup input streams */ DataInput in = new DataInputStream(new ByteArrayInputStream(data)); /* Read in various values NORMALLY */ byte[] b = new byte[2]; in.readFully(b); assertEquals(-100, b[0]); assertEquals(100, b[1]); assertEquals(true, in.readBoolean()); assertEquals(false, in.readBoolean()); assertEquals(100, in.readByte());
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/LittleEndianDataOutputStreamTest.java
/* Setup input streams */ DataInput in = new DataInputStream(new ByteArrayInputStream(data)); /* Read in various values NORMALLY */ byte[] b = new byte[2]; in.readFully(b); assertEquals(-100, b[0]); assertEquals(100, b[1]); assertEquals(true, in.readBoolean()); assertEquals(false, in.readBoolean()); assertEquals(100, in.readByte());
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.7K bytes - Viewed (0) -
src/net/http/filetransport_test.go
t.Errorf("for %s, ContentLength = %d, want -1", urlstr, res.ContentLength) } if res.Body == nil { t.Fatalf("for %s, nil Body", urlstr) } slurp, err := io.ReadAll(res.Body) res.Body.Close() check("ReadAll "+urlstr, err) if string(slurp) != "Bar" { t.Errorf("for %s, got content %q, want %q", urlstr, string(slurp), "Bar") } } const badURL = "file://../no-exist.txt"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 07 17:07:12 UTC 2023 - 2.6K bytes - Viewed (0) -
src/io/ioutil/ioutil.go
"io/fs" "os" "slices" "strings" ) // ReadAll reads from r until an error or EOF and returns the data it read. // A successful call returns err == nil, not err == EOF. Because ReadAll is // defined to read from src until EOF, it does not treat an EOF from Read // as an error to be reported. // // Deprecated: As of Go 1.16, this function simply calls [io.ReadAll]. func ReadAll(r io.Reader) ([]byte, error) { return io.ReadAll(r) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 3.2K bytes - Viewed (0) -
test/typeparam/chansimp.dir/main.go
"sync" "time" ) func TestReadAll() { c := make(chan int) go func() { c <- 4 c <- 2 c <- 5 close(c) }() got := a.ReadAll(context.Background(), c) want := []int{4, 2, 5} if !a.SliceEqual(got, want) { panic(fmt.Sprintf("ReadAll returned %v, want %v", got, want)) } } func TestMerge() { c1 := make(chan int) c2 := make(chan int) go func() { c1 <- 1 c1 <- 3
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 24 02:14:15 UTC 2022 - 3.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java
} public void testReadFully() throws IOException { DataInput in = new LittleEndianDataInputStream(new ByteArrayInputStream(data)); byte[] b = new byte[data.length]; in.readFully(b); assertEquals(Bytes.asList(data), Bytes.asList(b)); } public void testReadUnsignedByte_eof() throws IOException { DataInput in = new LittleEndianDataInputStream(new ByteArrayInputStream(new byte[0]));
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 4.8K bytes - Viewed (0) -
src/mime/multipart/writer_test.go
if err != nil { t.Fatalf("part 1: %v", err) } if g, e := part.FormName(), "myfile"; g != e { t.Errorf("part 1: want form name %q, got %q", e, g) } slurp, err := io.ReadAll(part) if err != nil { t.Fatalf("part 1: ReadAll: %v", err) } if e, g := string(fileContents), string(slurp); e != g { t.Errorf("part 1: want contents %q, got %q", e, g) } part, err = r.NextPart() if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 06 17:36:47 UTC 2022 - 4.1K bytes - Viewed (0) -
src/cmd/go/internal/vcweb/vcweb_test.go
defer srv.Close() resp, err := http.Get(srv.URL + "/help") if err != nil { t.Fatal(err) } defer resp.Body.Close() if resp.StatusCode != 200 { t.Fatal(resp.Status) } body, err := io.ReadAll(resp.Body) if err != nil { t.Fatal(err) } t.Logf("%s", body) } func TestOverview(t *testing.T) { s, err := vcweb.NewServer(os.DevNull, t.TempDir(), log.Default()) if err != nil { t.Fatal(err)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 25 13:00:34 UTC 2022 - 1.1K bytes - Viewed (0)