Search Options

Results per page
Sort
Preferred Languages
Advance

Results 271 - 280 of 304 for buf1 (0.04 sec)

  1. src/archive/zip/reader_test.go

    		"../foo",
    		"/foo",
    		"a/b/../../../c",
    		`a\b`,
    	} {
    		var buf bytes.Buffer
    		zw := NewWriter(&buf)
    		_, err := zw.Create(path)
    		if err != nil {
    			t.Errorf("zw.Create(%q) = %v", path, err)
    			continue
    		}
    		zw.Close()
    
    		zr, err := NewReader(bytes.NewReader(buf.Bytes()), int64(buf.Len()))
    		if err != ErrInsecurePath {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Jul 25 00:25:45 UTC 2024
    - 55.6K bytes
    - Viewed (0)
  2. internal/bpool/bpool_test.go

    	}
    
    	bp.Put(b)
    
    	// Check the size of the pool.
    	if uint64(len(bp.c)) != size {
    		t.Fatalf("bytepool size invalid: got %v want %v", len(bp.c), size)
    	}
    
    	// lets drain the buf channel first before we validate invalid buffers.
    	for i := uint64(0); i < size; i++ {
    		bp.Get() // discard
    	}
    
    	// Try putting some invalid buffers into pool
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 29 01:40:52 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  3. guava/src/com/google/common/math/Stats.java

       *
       * <p><b>Note:</b> No guarantees are made regarding stability of the representation between
       * versions.
       */
      public byte[] toByteArray() {
        ByteBuffer buff = ByteBuffer.allocate(BYTES).order(ByteOrder.LITTLE_ENDIAN);
        writeTo(buff);
        return buff.array();
      }
    
      /**
       * Writes to the given {@link ByteBuffer} a byte representation of this instance.
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 23 16:45:30 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/fess/mylasta/direction/sponsor/FessMultipartRequestHandler.java

            try {
                final InputStream is = request.getInputStream();
                try {
                    final byte[] buf = new byte[1024];
                    while ((is.read(buf)) != -1) {}
                } catch (final Exception ignored) {} finally {
                    try {
                        is.close();
                    } catch (final Exception ignored) {}
                }
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Wed Oct 23 13:27:21 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  5. internal/rest/client.go

    		Host:       u.Host,
    	}
    	req = req.WithContext(ctx)
    	if body != nil {
    		switch v := body.(type) {
    		case *bytes.Buffer:
    			req.ContentLength = int64(v.Len())
    			buf := v.Bytes()
    			req.GetBody = func() (io.ReadCloser, error) {
    				r := bytes.NewReader(buf)
    				return io.NopCloser(r), nil
    			}
    		case *bytes.Reader:
    			req.ContentLength = int64(v.Len())
    			snapshot := *v
    			req.GetBody = func() (io.ReadCloser, error) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 26 12:55:01 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  6. cmd/data-usage-cache.go

    	select {
    	case <-ctx.Done():
    		return ctx.Err()
    	case maxConcurrentScannerSaves <- struct{}{}:
    	}
    
    	buf := bytebufferpool.Get()
    	defer func() {
    		<-maxConcurrentScannerSaves
    		buf.Reset()
    		bytebufferpool.Put(buf)
    	}()
    
    	if err := d.serializeTo(buf); err != nil {
    		return err
    	}
    
    	save := func(name string, timeout time.Duration) error {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 15:30:50 UTC 2024
    - 34.7K bytes
    - Viewed (0)
  7. cmd/bucket-replication-handlers.go

    	if err = replicationConfig.Validate(bucket, sameTarget); err != nil {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErrWithErr(ErrReplicationValidationError, err), r.URL)
    		return
    	}
    	buf := bytes.Repeat([]byte("a"), 8)
    	for _, rule := range replicationConfig.Rules {
    		if rule.Status == replication.Disabled {
    			continue
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 15 12:04:40 UTC 2024
    - 23.3K bytes
    - Viewed (0)
  8. cmd/object-api-utils_test.go

    	}
    
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			buf := make([]byte, 100) // make small buffer to ensure multiple reads are required for large case
    
    			r, idxCB := newS2CompressReader(bytes.NewReader(tt.data), int64(len(tt.data)), false)
    			defer r.Close()
    
    			var rdrBuf bytes.Buffer
    			_, err := io.CopyBuffer(&rdrBuf, r, buf)
    			if err != nil {
    				t.Fatal(err)
    			}
    			r.Close()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  9. cmd/admin-handlers-users_test.go

    		Status:     madmin.AccountEnabled,
    	}
    	buf, err := json.Marshal(reqBodyArg)
    	if err != nil {
    		c.Fatalf("unexpected json encode err: %v", err)
    	}
    	buf, err = madmin.EncryptData(secretKey, buf)
    	if err != nil {
    		c.Fatalf("unexpected encryption err: %v", err)
    	}
    
    	req.ContentLength = int64(len(buf))
    	sum := sha256.Sum256(buf)
    	req.Header.Set("X-Amz-Content-Sha256", hex.EncodeToString(sum[:]))
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Sep 22 00:33:43 UTC 2024
    - 47.3K bytes
    - Viewed (0)
  10. cmd/admin-handlers.go

    		return
    	}
    	// Convert local entries to JSON
    	go func() {
    		var buf bytes.Buffer
    		enc := json.NewEncoder(&buf)
    		for {
    			select {
    			case <-ctx.Done():
    				return
    			case li := <-logCh:
    				if !li.SendLog(node, logKind) {
    					continue
    				}
    				buf.Reset()
    				if err := enc.Encode(li); err != nil {
    					continue
    				}
    				select {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 04 11:32:32 UTC 2024
    - 99.7K bytes
    - Viewed (0)
Back to top