- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for readFully (0.19 sec)
-
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: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 4.7K 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: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 4.7K bytes - Viewed (0) -
guava/src/com/google/common/io/ByteStreams.java
} @Override public void readFully(byte b[]) { try { input.readFully(b); } catch (IOException e) { throw new IllegalStateException(e); } } @Override public void readFully(byte b[], int off, int len) { try { input.readFully(b, off, len); } catch (IOException e) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 29.7K bytes - Viewed (0) -
cmd/bitrot-streaming.go
} } if offset != b.currOffset { // Can never happen unless there are programmer bugs return 0, errUnexpected } b.h.Reset() _, err = io.ReadFull(b.rc, b.hashBytes) if err != nil { return 0, err } _, err = io.ReadFull(b.rc, buf) if err != nil { return 0, err } b.h.Write(buf) if !bytes.Equal(b.h.Sum(nil), b.hashBytes) { return 0, errFileCorrupt }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 21 12:20:54 UTC 2024 - 6K bytes - Viewed (0) -
cmd/dummy-data-generator_test.go
// also returned. func cmpReaders(r1, r2 io.Reader) (bool, string) { bufLen := 32 * 1024 b1, b2 := make([]byte, bufLen), make([]byte, bufLen) for i := 0; true; i++ { n1, e1 := io.ReadFull(r1, b1) n2, e2 := io.ReadFull(r2, b2) if n1 != n2 { return false, fmt.Sprintf("Read %d != %d bytes from the readers", n1, n2) } if !bytes.Equal(b1[:n1], b2[:n2]) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jul 02 15:13:05 UTC 2024 - 4.7K bytes - Viewed (0) -
internal/s3select/json/preader.go
if cap(dst) < skip { dst = make([]byte, 0, skip+1024) } dst = dst[:skip] if skip > 0 { n, err := io.ReadFull(r.buf, dst) if err != nil && err != io.ErrUnexpectedEOF { // If an EOF happens after reading some but not all the bytes, // ReadFull returns ErrUnexpectedEOF. return dst[:n], err } dst = dst[:n] if err == io.ErrUnexpectedEOF { return dst, io.EOF } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 6.5K bytes - Viewed (0) -
cmd/untar.go
asyncWriters <- struct{}{} b := poolBuf128k.Get().([]byte) if cap(b) < int(header.Size) { b = make([]byte, smallFileThreshold) } b = b[:header.Size] if _, err := io.ReadFull(tarReader, b); err != nil { return err } wg.Add(1) go func(name string, fi fs.FileInfo, b []byte) { rc := disconnectReader{r: bytes.NewReader(b)} defer func() { rc.Close()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 22 00:33:43 UTC 2024 - 6K bytes - Viewed (2) -
internal/auth/credentials.go
} if length <= 0 { length = accessKeyMaxLen } if length < accessKeyMinLen { return "", errors.New("auth: access key length is too short") } key := make([]byte, length) if _, err := io.ReadFull(random, key); err != nil { return "", err } for i := range key { key[i] = alphaNumericTable[key[i]%alphaNumericTableLen] } return string(key), nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue May 28 17:14:16 UTC 2024 - 12K bytes - Viewed (0) -
src/archive/zip/reader.go
// first read just those 4 bytes to see if it exists. if _, err := io.ReadFull(r, buf[:4]); err != nil { return err } off := 0 maybeSig := readBuf(buf[:4]) if maybeSig.uint32() != dataDescriptorSignature { // No data descriptor signature. Keep these four // bytes. off += 4 } if _, err := io.ReadFull(r, buf[off:12]); err != nil { return err } b := readBuf(buf[:12])
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Sat Aug 03 01:05:29 UTC 2024 - 28.1K bytes - Viewed (0) -
src/archive/tar/reader_test.go
t.Fatalf("entry %d, Next(): got %v, want %v", i, err, nil) } buf := make([]byte, tc.cnt) if _, err := io.ReadFull(tr, buf); err != nil { t.Fatalf("entry %d, ReadFull(): got %v, want %v", i, err, nil) } if string(buf) != tc.output { t.Fatalf("entry %d, ReadFull(): got %q, want %q", i, string(buf), tc.output) } } if _, err := tr.Next(); err != io.EOF {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 03 15:48:09 UTC 2024 - 46.9K bytes - Viewed (0)