- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 468 for byte (0.02 seconds)
-
src/bytes/bytes.go
return Map(c.ToTitle, s) } // ToValidUTF8 treats s as UTF-8-encoded bytes and returns a copy with each run of bytes // representing invalid UTF-8 replaced with the bytes in replacement, which may be empty. func ToValidUTF8(s, replacement []byte) []byte { b := make([]byte, 0, len(s)+len(replacement)) invalid := false // previous byte was from an invalid UTF-8 sequence for i := 0; i < len(s); {
Created: 2026-04-07 11:13 - Last Modified: 2026-03-12 17:56 - 36.3K bytes - Click Count (0) -
guava-tests/test/com/google/common/hash/HashCodeTest.java
0x13579bdf, null, "df9b5713"), new ExpectedHashCode( new byte[] {(byte) 0xcd, (byte) 0xab, (byte) 0x00, (byte) 0x00}, 0x0000abcd, null, "cdab0000"), new ExpectedHashCode( new byte[] { (byte) 0xef, (byte) 0xcd, (byte) 0xab, (byte) 0x00,Created: 2026-04-03 12:43 - Last Modified: 2026-03-19 18:53 - 13.2K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/hash/HashCodeTest.java
0x13579bdf, null, "df9b5713"), new ExpectedHashCode( new byte[] {(byte) 0xcd, (byte) 0xab, (byte) 0x00, (byte) 0x00}, 0x0000abcd, null, "cdab0000"), new ExpectedHashCode( new byte[] { (byte) 0xef, (byte) 0xcd, (byte) 0xab, (byte) 0x00,Created: 2026-04-03 12:43 - Last Modified: 2026-03-19 18:53 - 13.2K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/primitives/BytesTest.java
new byte[] {(byte) 2, (byte) 3, (byte) 4})) .isEqualTo(2); assertThat( Bytes.indexOf( new byte[] {(byte) 2, (byte) 2, (byte) 3, (byte) 4, (byte) 2, (byte) 3, (byte) 4}, new byte[] {(byte) 2, (byte) 3, (byte) 4})) .isEqualTo(1); assertThat( Bytes.indexOf( new byte[] {(byte) 4, (byte) 3, (byte) 2},Created: 2026-04-03 12:43 - Last Modified: 2026-03-08 01:43 - 17.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/io/ByteStreamsTest.java
ByteArrayDataInput in = ByteStreams.newDataInput(bytes); byte[] actual = new byte[bytes.length]; in.readFully(actual); assertThat(actual).isEqualTo(bytes); } public void testNewDataInput_readFullyAndThenSome() { ByteArrayDataInput in = ByteStreams.newDataInput(bytes); byte[] actual = new byte[bytes.length * 2]; IllegalStateException ex =
Created: 2026-04-03 12:43 - Last Modified: 2026-03-17 19:26 - 22K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java
Created: 2026-04-03 12:43 - Last Modified: 2026-03-08 01:43 - 13.6K bytes - Click Count (0) -
guava-tests/test/com/google/common/primitives/BytesTest.java
new byte[] {(byte) 2, (byte) 3, (byte) 4})) .isEqualTo(2); assertThat( Bytes.indexOf( new byte[] {(byte) 2, (byte) 2, (byte) 3, (byte) 4, (byte) 2, (byte) 3, (byte) 4}, new byte[] {(byte) 2, (byte) 3, (byte) 4})) .isEqualTo(1); assertThat( Bytes.indexOf( new byte[] {(byte) 4, (byte) 3, (byte) 2},Created: 2026-04-03 12:43 - Last Modified: 2026-03-08 01:43 - 17.5K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/hash/Crc32cHashFunctionTest.java
assertCrc(0x62a8ab43, fulls); } public void testFull100() { // Test 100 byte array of 0xFF. byte[] fulls = new byte[100]; Arrays.fill(fulls, (byte) 0xFF); assertCrc(0xbc753add, fulls); } public void testAscending() { // Test 32 byte arrays of ascending. byte[] ascending = new byte[32]; for (int i = 0; i < 32; i++) { ascending[i] = (byte) i; }
Created: 2026-04-03 12:43 - Last Modified: 2026-03-19 18:53 - 6.6K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java
public void testBytes() { TestHasher hasher = new TestHasher(); // byte order insignificant here byte[] expected = {1, 2, 3, 4, 5, 6, 7, 8}; hasher.putByte((byte) 1); hasher.putBytes(new byte[] {2, 3, 4, 5, 6}); hasher.putByte((byte) 7); hasher.putBytes(new byte[] {}); hasher.putBytes(new byte[] {8}); hasher.assertBytes(expected); } public void testShort() {
Created: 2026-04-03 12:43 - Last Modified: 2025-12-26 21:52 - 3.9K bytes - Click Count (0) -
guava-tests/test/com/google/common/io/ByteSourceTest.java
private static class AppendableByteSource extends ByteSource { private byte[] bytes; AppendableByteSource(byte[] initialBytes) { this.bytes = initialBytes.clone(); } @Override public InputStream openStream() { return new In(); } void append(byte[] b) { byte[] newBytes = Arrays.copyOf(bytes, bytes.length + b.length);Created: 2026-04-03 12:43 - Last Modified: 2026-03-19 18:53 - 15.6K bytes - Click Count (0)