- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for newDataOutput (0.19 sec)
-
android/guava-tests/test/com/google/common/io/ByteStreamsTest.java
assertEquals(0x12345678, in.readInt()); } public void testNewDataOutput_empty() { ByteArrayDataOutput out = ByteStreams.newDataOutput(); assertEquals(0, out.toByteArray().length); } public void testNewDataOutput_writeInt() { ByteArrayDataOutput out = ByteStreams.newDataOutput(); out.writeInt(0x12345678); out.writeInt(0x76543210); assertThat(out.toByteArray()).isEqualTo(bytes); }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 21.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteStreamsTest.java
assertEquals(0x12345678, in.readInt()); } public void testNewDataOutput_empty() { ByteArrayDataOutput out = ByteStreams.newDataOutput(); assertEquals(0, out.toByteArray().length); } public void testNewDataOutput_writeInt() { ByteArrayDataOutput out = ByteStreams.newDataOutput(); out.writeInt(0x12345678); out.writeInt(0x76543210); assertThat(out.toByteArray()).isEqualTo(bytes); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 21.9K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ByteStreams.java
public static ByteArrayDataOutput newDataOutput() { return newDataOutput(new ByteArrayOutputStream()); } /** * Returns a new {@link ByteArrayDataOutput} instance sized to hold {@code size} bytes before * resizing. * * @throws IllegalArgumentException if {@code size} is negative */ public static ByteArrayDataOutput newDataOutput(int size) {
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) -
android/guava/src/com/google/common/primitives/Shorts.java
* * <p>If you need to convert and concatenate several values (possibly even of different types), * use a shared {@link java.nio.ByteBuffer} instance, or use {@link * com.google.common.io.ByteStreams#newDataOutput()} to get a growable buffer. */ @GwtIncompatible // doesn't work public static byte[] toByteArray(short value) { return new byte[] {(byte) (value >> 8), (byte) value}; } /**
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 25.1K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/Chars.java
* * <p>If you need to convert and concatenate several values (possibly even of different types), * use a shared {@link java.nio.ByteBuffer} instance, or use {@link * com.google.common.io.ByteStreams#newDataOutput()} to get a growable buffer. */ @GwtIncompatible // doesn't work public static byte[] toByteArray(char value) { return new byte[] {(byte) (value >> 8), (byte) value}; } /**
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 23.5K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/Longs.java
* * <p>If you need to convert and concatenate several values (possibly even of different types), * use a shared {@link java.nio.ByteBuffer} instance, or use {@link * com.google.common.io.ByteStreams#newDataOutput()} to get a growable buffer. */ public static byte[] toByteArray(long value) { // Note that this code needs to stay compatible with GWT, which has known // bugs when narrowing byte casts of long values occur.
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 28.7K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/Ints.java
* * <p>If you need to convert and concatenate several values (possibly even of different types), * use a shared {@link java.nio.ByteBuffer} instance, or use {@link * com.google.common.io.ByteStreams#newDataOutput()} to get a growable buffer. */ public static byte[] toByteArray(int value) { return new byte[] { (byte) (value >> 24), (byte) (value >> 16), (byte) (value >> 8), (byte) value }; }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 29.7K bytes - Viewed (0)