- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 90 for buf2 (0.03 sec)
-
src/archive/zip/writer_test.go
} // make a new zip file copying the old compressed data. buf2 := new(bytes.Buffer) dst := NewWriter(buf2) for _, f := range src.File { if err := dst.Copy(f); err != nil { t.Fatal(err) } } if err := dst.Close(); err != nil { t.Fatal(err) } // read the new one back r, err := NewReader(bytes.NewReader(buf2.Bytes()), int64(buf2.Len())) if err != nil { t.Fatal(err) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Sep 23 14:32:33 UTC 2024 - 14.4K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ByteSource.java
checkNotNull(other); byte[] buf1 = createBuffer(); byte[] buf2 = createBuffer(); Closer closer = Closer.create(); try { InputStream in1 = closer.register(openStream()); InputStream in2 = closer.register(other.openStream()); while (true) { int read1 = ByteStreams.read(in1, buf1, 0, buf1.length); int read2 = ByteStreams.read(in2, buf2, 0, buf2.length);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 26.2K bytes - Viewed (0) -
src/bufio/bufio_test.go
} func TestWriterReset(t *testing.T) { var buf1, buf2, buf3, buf4, buf5 strings.Builder w := NewWriter(&buf1) w.WriteString("foo") w.Reset(&buf2) // and not flushed w.WriteString("bar") w.Flush() if buf1.String() != "" { t.Errorf("buf1 = %q; want empty", buf1.String()) } if buf2.String() != "bar" { t.Errorf("buf2 = %q; want bar", buf2.String()) }
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_test.go
} // Verify that contents of buf match the string s. func check(t *testing.T, testname string, buf *Buffer, s string) { bytes := buf.Bytes() str := buf.String() if buf.Len() != len(bytes) { t.Errorf("%s: buf.Len() == %d, len(buf.Bytes()) == %d", testname, buf.Len(), len(bytes)) } if buf.Len() != len(str) { t.Errorf("%s: buf.Len() == %d, len(buf.String()) == %d", testname, buf.Len(), len(str)) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0) -
internal/jwt/parser.go
} headerDec := buf[:n] buf = buf[n:] alg, _, _, err := jsonparser.Get(headerDec, "alg") if err != nil { return nil, &jwtgo.ValidationError{Inner: err, Errors: jwtgo.ValidationErrorMalformed} } n, err = base64DecodeBytes(token[i+1:j], buf) if err != nil { return nil, &jwtgo.ValidationError{Inner: err, Errors: jwtgo.ValidationErrorMalformed} } if err = claims.UnmarshalJSON(buf[:n]); err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 17 16:45:46 UTC 2024 - 14.1K bytes - Viewed (0) -
cmd/erasure-decode.go
startBlock := int64(0) endBlock := totalLength / e.blockSize if totalLength%e.blockSize != 0 { endBlock++ } var bufs [][]byte for block := startBlock; block < endBlock; block++ { var err error bufs, err = reader.Read(bufs) if len(bufs) > 0 { if errors.Is(err, errFileNotFound) || errors.Is(err, errFileCorrupt) { if derr == nil { derr = err } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 29 01:40:52 UTC 2024 - 9.5K bytes - Viewed (0) -
guava/src/com/google/common/io/ByteStreams.java
byte[] buf = new byte[min(bufSize, MAX_ARRAY_LEN - totalLen)]; bufs.add(buf); int off = 0; while (off < buf.length) { // always OK to fill buf; its size plus the rest of bufs is never more than MAX_ARRAY_LEN int r = in.read(buf, off, buf.length - off); if (r == -1) { return combineBuffers(bufs, totalLen); } off += r;
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/xl-storage.go
stat, err := f.Stat() if err != nil { buf, err = io.ReadAll(f) return buf, dmTime, osErrToFileErr(err) } if stat.IsDir() { return nil, dmTime, errFileNotFound } // Read into appropriate buffer. sz := stat.Size() if sz <= metaDataReadDefault { buf = metaDataPoolGet() buf = buf[:sz] } else { buf = make([]byte, sz) } // Read file...
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 26 09:58:27 UTC 2024 - 91.3K bytes - Viewed (0) -
cmd/erasure-object.go
// We use 2 buffers, so we always have a full buffer of input. pool := globalBytePoolCap.Load() bufA := pool.Get() bufB := pool.Get() defer pool.Put(bufA) defer pool.Put(bufB) ra, err := readahead.NewReaderBuffer(data, [][]byte{bufA[:fi.Erasure.BlockSize], bufB[:fi.Erasure.BlockSize]}) if err == nil { toEncode = ra defer ra.Close() } bugLogIf(ctx, err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 22:10:24 UTC 2024 - 78.8K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/api/json/SearchApiManager.java
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Sat Oct 12 01:54:46 UTC 2024 - 50.3K bytes - Viewed (0)