Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 601 for bufs (0.15 sec)

  1. android/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;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 17 18:59:58 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  2. 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
    				}
    			}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  3. 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())
    	}
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  4. BUGS-AND-FEATURE-REQUESTS.md

    # Bugs and Feature Requests
    
    You can report bugs and feature requests to the Istio team in one of three places:
    
    - [Product Bugs and Feature Requests](https://github.com/istio/istio/issues)
    - [Documentation Bugs and Feature Requests](https://github.com/istio/istio.io/issues)
    - [Community and Governance Issues](https://github.com/istio/community/issues)
    
    For security vulnerabilities, please don't report a bug (which is public) and instead follow
    Plain Text
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Mon Jun 17 16:57:25 GMT 2019
    - 519 bytes
    - Viewed (0)
  5. src/bytes/bytes_test.go

    			if j != n-3 {
    				b.Fatal("bad index", j)
    			}
    		}
    		buf[n-3] = '\x00'
    		buf[n-2] = '\x00'
    		buf[n-1] = '\x00'
    	}
    }
    
    func BenchmarkEqual(b *testing.B) {
    	b.Run("0", func(b *testing.B) {
    		var buf [4]byte
    		buf1 := buf[0:0]
    		buf2 := buf[1:1]
    		for i := 0; i < b.N; i++ {
    			eq := Equal(buf1, buf2)
    			if !eq {
    				b.Fatal("bad equal")
    			}
    		}
    	})
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  6. src/bytes/example_test.go

    	var buf bytes.Buffer
    	for i := 0; i < 4; i++ {
    		b := buf.AvailableBuffer()
    		b = strconv.AppendInt(b, int64(i), 10)
    		b = append(b, ' ')
    		buf.Write(b)
    	}
    	os.Stdout.Write(buf.Bytes())
    	// Output: 0 1 2 3
    }
    
    func ExampleBuffer_Cap() {
    	buf1 := bytes.NewBuffer(make([]byte, 10))
    	buf2 := bytes.NewBuffer(make([]byte, 0, 10))
    	fmt.Println(buf1.Cap())
    	fmt.Println(buf2.Cap())
    	// Output:
    	// 10
    	// 10
    }
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  7. 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 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue May 09 07:53:08 GMT 2023
    - 13.9K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/CharSequenceReaderTest.java

        assertEquals(expected, buf2.toString());
        assertFullyRead(reader);
    
        // read in chunks to fixed CharBuffer
        reader = new CharSequenceReader(charSequence);
        buf2 = CharBuffer.allocate(5);
        builder = new StringBuilder();
        while (reader.read(buf2) != -1) {
          Java8Compatibility.flip(buf2);
          builder.append(buf2);
          Java8Compatibility.clear(buf2);
        }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/io/CharSequenceReaderTest.java

        assertEquals(expected, buf2.toString());
        assertFullyRead(reader);
    
        // read in chunks to fixed CharBuffer
        reader = new CharSequenceReader(charSequence);
        buf2 = CharBuffer.allocate(5);
        builder = new StringBuilder();
        while (reader.read(buf2) != -1) {
          Java8Compatibility.flip(buf2);
          builder.append(buf2);
          Java8Compatibility.clear(buf2);
        }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  10. cmd/os_unix.go

    		}
    
    	}
    	defer syscall.Close(fd)
    
    	bufp := direntPool.Get().(*[]byte)
    	defer direntPool.Put(bufp)
    	buf := *bufp
    
    	boff := 0 // starting read position in buf
    	nbuf := 0 // end valid data in buf
    
    	for {
    		if boff >= nbuf {
    			boff = 0
    			stop := globalOSMetrics.time(osMetricReadDirent)
    			nbuf, err = syscall.ReadDirent(fd, buf)
    			stop()
    			if err != nil {
    				if isSysErrNotDir(err) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.3K bytes
    - Viewed (0)
Back to top