Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 849 for xBytes (0.14 sec)

  1. okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt

        val body = body("")
        assertThat(body.bytes().size).isEqualTo(0)
      }
    
      @Test
      fun bytesSeesBom() {
        val body = body("efbbbf68656c6c6f")
        val bytes = body.bytes()
        assertThat(bytes[0] and 0xff).isEqualTo(0xef)
        assertThat(bytes[1] and 0xff).isEqualTo(0xbb)
        assertThat(bytes[2] and 0xff).isEqualTo(0xbf)
        assertThat(String(bytes, 3, 5, StandardCharsets.UTF_8)).isEqualTo("hello")
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  2. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

          MockResponse.Builder()
            .socketPolicy(DisconnectDuringRequestBody)
            .build(),
        )
        // Limit the size of the request body that the server holds in memory to an arbitrary
        // 3.5 MBytes so this test can pass on devices with little memory.
        server.bodyLimit = 7 * 512 * 1024
        val connection = server.url("/").toUrl().openConnection() as HttpURLConnection
        connection.requestMethod = "POST"
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  3. src/bytes/example_test.go

    func ExampleBuffer_Grow() {
    	var b bytes.Buffer
    	b.Grow(64)
    	bb := b.Bytes()
    	b.Write([]byte("64 bytes or fewer"))
    	fmt.Printf("%q", bb[:b.Len()])
    	// Output: "64 bytes or fewer"
    }
    
    func ExampleBuffer_Len() {
    	var b bytes.Buffer
    	b.Grow(64)
    	b.Write([]byte("abcde"))
    	fmt.Printf("%d", b.Len())
    	// Output: 5
    }
    
    func ExampleBuffer_Next() {
    	var b bytes.Buffer
    	b.Grow(64)
    	b.Write([]byte("abcde"))
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  4. internal/hash/reader_test.go

    		},
    		{
    			desc:       "Correct sha256, truncated",
    			src:        bytes.NewReader([]byte("abcd-morethan-4-bytes")),
    			size:       4,
    			actualSize: 4,
    			sha256hex:  "88d4266fd4e6338d13b845fcf289579d209c897823b9217da3e161936f031589",
    			err:        ioutil.ErrOverread,
    		},
    		{
    			desc:       "Correct MD5, nested",
    			src:        mustReader(t, bytes.NewReader([]byte("abcd")), 4, "", "", 4),
    			size:       4,
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 18 17:00:54 GMT 2023
    - 10.3K bytes
    - Viewed (0)
  5. cmd/bucket-replication-utils_gen_test.go

    	v := BucketReplicationResyncStatus{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    	b.SetBytes(int64(buf.Len()))
    	en := msgp.NewWriter(msgp.Nowhere)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.EncodeMsg(en)
    	}
    	en.Flush()
    }
    
    func BenchmarkDecodeBucketReplicationResyncStatus(b *testing.B) {
    	v := BucketReplicationResyncStatus{}
    	var buf bytes.Buffer
    	msgp.Encode(&buf, &v)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Aug 22 23:53:06 GMT 2022
    - 23K bytes
    - Viewed (0)
  6. schema/serializer.go

    	fieldValue := reflect.New(field.FieldType)
    
    	if dbValue != nil {
    		var bytes []byte
    		switch v := dbValue.(type) {
    		case []byte:
    			bytes = v
    		case string:
    			bytes = []byte(v)
    		default:
    			return fmt.Errorf("failed to unmarshal JSONB value: %#v", dbValue)
    		}
    
    		if len(bytes) > 0 {
    			err = json.Unmarshal(bytes, fieldValue.Interface())
    		}
    	}
    
    	field.ReflectValueOf(ctx, dst).Set(fieldValue.Elem())
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 08:28:46 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  7. istioctl/pkg/writer/envoy/configdump/ecds_test.go

    	assert.NoError(t, err)
    
    	util.CompareContent(t, gotOut.Bytes(), "testdata/ecds/output.txt")
    }
    
    func TestPrintEcdsYaml(t *testing.T) {
    	gotOut := &bytes.Buffer{}
    	cw := &ConfigWriter{Stdout: gotOut}
    	cd, _ := os.ReadFile("testdata/ecds/configdump.json")
    	cw.Prime(cd)
    	err := cw.PrintEcds("yaml")
    	assert.NoError(t, err)
    
    	util.CompareContent(t, gotOut.Bytes(), "testdata/ecds/output.yaml")
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Dec 13 01:08:07 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  8. cmd/metrics-v3-cluster-health.go

    const (
    	healthCapacityRawTotalBytes    = "capacity_raw_total_bytes"
    	healthCapacityRawFreeBytes     = "capacity_raw_free_bytes"
    	healthCapacityUsableTotalBytes = "capacity_usable_total_bytes"
    	healthCapacityUsableFreeBytes  = "capacity_usable_free_bytes"
    )
    
    var (
    	healthCapacityRawTotalBytesMD = NewGaugeMD(healthCapacityRawTotalBytes,
    		"Total cluster raw storage capacity in bytes")
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Mar 10 09:15:15 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  9. cmd/batch-rotate_gen_test.go

    import (
    	"bytes"
    	"testing"
    
    	"github.com/tinylib/msgp/msgp"
    )
    
    func TestMarshalUnmarshalBatchJobKeyRotateEncryption(t *testing.T) {
    	v := BatchJobKeyRotateEncryption{}
    	bts, err := v.MarshalMsg(nil)
    	if err != nil {
    		t.Fatal(err)
    	}
    	left, err := v.UnmarshalMsg(bts)
    	if err != nil {
    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Aug 29 18:27:23 GMT 2023
    - 11.8K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/hash/LittleEndianByteArray.java

      private static final LittleEndianBytes byteArray;
    
      /**
       * Load 8 bytes into long in a little endian manner, from the substring between position and
       * position + 8. The array must have at least 8 bytes from offset (inclusive).
       *
       * @param input the input bytes
       * @param offset the offset into the array at which to start
       * @return a long of a concatenated 8 bytes
       */
      static long load64(byte[] input, int offset) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 9.7K bytes
    - Viewed (0)
Back to top