Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 1,431 for byteEq (0.09 sec)

  1. guava-tests/test/com/google/common/io/TestByteSource.java

    import java.util.Random;
    
    /**
     * A byte source for testing that has configurable behavior.
     *
     * @author Colin Decker
     */
    public final class TestByteSource extends ByteSource implements TestStreamSupplier {
    
      private final byte[] bytes;
      private final ImmutableSet<TestOption> options;
    
      private boolean inputStreamOpened;
      private boolean inputStreamClosed;
    
      TestByteSource(byte[] bytes, TestOption... options) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Sep 15 13:47:32 UTC 2016
    - 1.9K bytes
    - Viewed (0)
  2. cmd/streaming-signature-v4_test.go

    	tests := []testCase{
    		// Test - 1 valid buffer with CRLF.
    		{bytes.NewReader([]byte("\r\n")), nil},
    		// Test - 2 invalid buffer with no CRLF.
    		{bytes.NewReader([]byte("he")), errMalformedEncoding},
    		// Test - 3 invalid buffer with more characters.
    		{bytes.NewReader([]byte("he\r\n")), errMalformedEncoding},
    		// Test - 4 smaller buffer than expected.
    		{bytes.NewReader([]byte("h")), io.ErrUnexpectedEOF},
    	}
    	for i, tt := range tests {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Apr 23 18:58:53 UTC 2021
    - 5.7K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/io/SourceSinkFactories.java

        }
    
        @Override
        public byte[] getExpected(byte[] bytes) {
          if (initialBytes == null) {
            return checkNotNull(bytes);
          } else {
            byte[] result = new byte[initialBytes.length + bytes.length];
            System.arraycopy(initialBytes, 0, result, 0, initialBytes.length);
            System.arraycopy(bytes, 0, result, initialBytes.length, bytes.length);
            return result;
          }
        }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/io/SerializeUtil.java

        }
    
        /**
         * {@literal byte}の配列をオブジェクトに変換します。
         *
         * @param bytes
         *            デシリアライズする配列。{@literal null}や空配列であってはいけません
         * @return 復元したオブジェクト
         */
        public static Object fromBinaryToObject(final byte[] bytes) {
            assertArgumentNotEmpty("bytes", bytes);
    
            try {
                final ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  5. cmd/bucket-replication-metrics_gen_test.go

    import (
    	"bytes"
    	"testing"
    
    	"github.com/tinylib/msgp/msgp"
    )
    
    func TestMarshalUnmarshalActiveWorkerStat(t *testing.T) {
    	v := ActiveWorkerStat{}
    	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 {
    		t.Errorf("%d bytes left over after UnmarshalMsg(): %q", len(left), left)
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Feb 06 06:00:45 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  6. cmd/benchmark-utils_test.go

    // randomly picks a character and returns its equivalent byte array.
    func getRandomByte() []byte {
    	const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
    	// seeding the random number generator.
    	rand.Seed(UTCNow().UnixNano())
    	// pick a character randomly.
    	return []byte{letterBytes[rand.Intn(len(letterBytes))]}
    }
    
    // picks a random byte and repeats it to size bytes.
    func generateBytesData(size int) []byte {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Dec 23 15:46:00 UTC 2022
    - 8.2K bytes
    - Viewed (0)
  7. cmd/erasure-server-pool-rebalance_gen.go

    // MarshalMsg implements msgp.Marshaler
    func (z rebalanceMetrics) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	// map header, size 0
    	_ = z
    	o = append(o, 0x80)
    	return
    }
    
    // UnmarshalMsg implements msgp.Unmarshaler
    func (z *rebalanceMetrics) UnmarshalMsg(bts []byte) (o []byte, err error) {
    	var field []byte
    	_ = field
    	var zb0001 uint32
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Mar 21 17:21:35 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  8. 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)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Aug 22 23:53:06 UTC 2022
    - 23K bytes
    - Viewed (0)
  9. cmd/site-replication-metrics_gen.go

    		err = msgp.WrapError(err, "Count")
    		return
    	}
    	// write "Bytes"
    	err = en.Append(0xa5, 0x42, 0x79, 0x74, 0x65, 0x73)
    	if err != nil {
    		return
    	}
    	err = en.WriteInt64(z.Bytes)
    	if err != nil {
    		err = msgp.WrapError(err, "Bytes")
    		return
    	}
    	return
    }
    
    // MarshalMsg implements msgp.Marshaler
    func (z RStat) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	// map header, size 2
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Feb 06 06:00:45 UTC 2024
    - 40.6K bytes
    - Viewed (0)
  10. cmd/bucket-lifecycle-handlers_test.go

    		}
    		if testCase.shouldPass && !bytes.Equal(testCase.lifecycleResponse, rec.Body.Bytes()) {
    			t.Errorf("Test %d: %s: Expected the response to be `%s`, but instead found `%s`", i+1, instanceType, string(testCase.lifecycleResponse), rec.Body.String())
    		}
    		errorResponse := APIErrorResponse{}
    		err = xml.Unmarshal(rec.Body.Bytes(), &errorResponse)
    		if err != nil && !testCase.shouldPass {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 11.3K bytes
    - Viewed (0)
Back to top