- Sort Score
- Result 10 results
- Languages All
Results 121 - 130 of 208 for newReader (0.1 sec)
-
internal/bucket/replication/rule_test.go
expectedResult: true, }, } for i, tc := range testCases { tc := tc t.Run(fmt.Sprintf("Test_%d", i+1), func(t *testing.T) { cfg, err := ParseConfig(bytes.NewReader([]byte(tc.inputConfig))) if err != nil { t.Fatalf("Got unexpected error: %v", err) } if got := cfg.Rules[0].MetadataReplicate(tc.opts); got != tc.expectedResult {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 4.6K bytes - Viewed (0) -
src/archive/zip/register.go
} var flateReaderPool sync.Pool func newFlateReader(r io.Reader) io.ReadCloser { fr, ok := flateReaderPool.Get().(io.ReadCloser) if ok { fr.(flate.Resetter).Reset(r, nil) } else { fr = flate.NewReader(r) } return &pooledFlateReader{fr: fr} } type pooledFlateReader struct { mu sync.Mutex // guards Close and Read fr io.ReadCloser } func (r *pooledFlateReader) Read(p []byte) (n int, err error) {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Oct 13 18:36:46 UTC 2023 - 3.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/FilesTest.java
File asciiFile = getTestFile("ascii.txt"); assertThrows(NullPointerException.class, () -> Files.newReader(asciiFile, null)); assertThrows(NullPointerException.class, () -> Files.newReader(null, UTF_8)); BufferedReader r = Files.newReader(asciiFile, US_ASCII); try { assertEquals(ASCII, r.readLine()); } finally { r.close(); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 22.1K bytes - Viewed (0) -
src/archive/zip/reader.go
return nil, err } r.f = f return r, err } // NewReader returns a new [Reader] reading from r, which is assumed to // have the given size in bytes. // // If any file inside the archive uses a non-local name // (as defined by [filepath.IsLocal]) or a name containing backslashes // and the GODEBUG environment variable contains `zipinsecurepath=0`, // NewReader returns the reader with an [ErrInsecurePath] error.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Sat Aug 03 01:05:29 UTC 2024 - 28.1K bytes - Viewed (0) -
cmd/veeam-sos-api.go
ci.Capacity = quotaSize } ci.Available = ci.Capacity - ci.Used buf = encodeResponse(&ci) default: return nil, errFileNotFound } etag := getMD5Hash(buf) r := bytes.NewReader(buf) off, length := int64(0), r.Size() if rs != nil { off, length, err = rs.GetOffsetLength(r.Size()) if err != nil { return nil, err } } r.Seek(off, io.SeekStart)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 00:34:56 UTC 2024 - 8.8K bytes - Viewed (0) -
internal/event/target/webhook.go
if err != nil { return err } req, err := http.NewRequest(http.MethodPost, target.args.Endpoint.String(), bytes.NewReader(data)) if err != nil { return err } // Verify if the authToken already contains // <Key> <Token> like format, if this is // already present we can blindly use the
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 8.8K bytes - Viewed (0) -
cmd/object-multipart-handlers.go
encodedSuccessResponse := encodeResponse(response) // Write success response. writeSuccessResponseXML(w, encodedSuccessResponse) return } actualPartSize = length var reader io.Reader = etag.NewReader(ctx, gr, nil, nil) mi, err := objectAPI.GetMultipartInfo(ctx, dstBucket, dstObject, uploadID, dstOpts) if err != nil { writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Aug 31 18:25:48 UTC 2024 - 39.2K bytes - Viewed (0) -
cmd/erasure-decode_test.go
for i, disk := range disks { writers[i] = newBitrotWriter(disk, "", "testbucket", "object", erasure.ShardFileSize(test.data), writeAlgorithm, erasure.ShardSize()) } n, err := erasure.Encode(context.Background(), bytes.NewReader(data), writers, buffer, erasure.dataBlocks+1) closeBitrotWriters(writers) if err != nil { t.Fatalf("Test %d: failed to create erasure test file: %v", i, err) } if n != test.data {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 21.1K bytes - Viewed (0) -
internal/s3select/select_benchmark_test.go
`) csvData := genSampleCSVData(count) b.ResetTimer() b.ReportAllocs() b.SetBytes(int64(count)) b.RunParallel(func(pb *testing.PB) { for pb.Next() { s3Select, err := NewS3Select(bytes.NewReader(requestXML)) if err != nil { b.Fatal(err) } if err = s3Select.Open(newBytesRSC(csvData)); err != nil { b.Fatal(err) } s3Select.Evaluate(&nullResponseWriter{})
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Apr 14 13:54:47 UTC 2022 - 5K bytes - Viewed (0) -
cmd/bucket-policy-handlers.go
if err != nil { writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } bucketPolicy, err := policy.ParseBucketPolicyConfig(bytes.NewReader(bucketPolicyBytes), bucket) if err != nil { writeErrorResponse(ctx, w, APIError{ Code: "MalformedPolicy", HTTPStatusCode: http.StatusBadRequest, Description: err.Error(), }, r.URL) return
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 6.1K bytes - Viewed (0)