- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for realBytes (0.16 sec)
-
android/guava-tests/test/com/google/common/base/Utf8Test.java
return new String(chars); } private static byte[] toByteArray(int... bytes) { byte[] realBytes = new byte[bytes.length]; for (int i = 0; i < bytes.length; i++) { realBytes[i] = (byte) bytes[i]; } return realBytes; } private static void assertWellFormed(int... bytes) { assertTrue(Utf8.isWellFormed(toByteArray(bytes))); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Fri Feb 09 15:49:48 GMT 2024 - 12.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/Utf8Test.java
return new String(chars); } private static byte[] toByteArray(int... bytes) { byte[] realBytes = new byte[bytes.length]; for (int i = 0; i < bytes.length; i++) { realBytes[i] = (byte) bytes[i]; } return realBytes; } private static void assertWellFormed(int... bytes) { assertTrue(Utf8.isWellFormed(toByteArray(bytes))); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Fri Feb 09 15:49:48 GMT 2024 - 12.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/FilesTest.java
@Override public byte[] getResult() { return out.toByteArray(); } }; File asciiFile = getTestFile("ascii.txt"); byte[] result = Files.readBytes(asciiFile, processor); assertEquals(Bytes.asList(Files.toByteArray(asciiFile)), Bytes.asList(result)); } public void testReadBytes_returnFalse() throws IOException { ByteProcessor<byte[]> processor =
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 22.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/ByteStreamsTest.java
return super.skip(Math.min(max, n)); } } public void testReadBytes() throws IOException { final byte[] array = newPreFilledByteArray(1000); assertThat(ByteStreams.readBytes(new ByteArrayInputStream(array), new TestByteProcessor())) .isEqualTo(array); } private static class TestByteProcessor implements ByteProcessor<byte[]> {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 21.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/FilesTest.java
@Override public byte[] getResult() { return out.toByteArray(); } }; File asciiFile = getTestFile("ascii.txt"); byte[] result = Files.readBytes(asciiFile, processor); assertEquals(Bytes.asList(Files.toByteArray(asciiFile)), Bytes.asList(result)); } public void testReadBytes_returnFalse() throws IOException { ByteProcessor<byte[]> processor =
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 22.2K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ByteSource.java
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed May 17 14:35:11 GMT 2023 - 26.2K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ByteStreams.java
* @throws IOException if an I/O error occurs * @since 14.0 */ @CanIgnoreReturnValue // some processors won't return a useful result @ParametricNullness public static <T extends @Nullable Object> T readBytes( InputStream input, ByteProcessor<T> processor) throws IOException { checkNotNull(input); checkNotNull(processor); byte[] buf = createBuffer(); int read; do {
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) -
guava-tests/test/com/google/common/io/ByteStreamsTest.java
return super.skip(Math.min(max, n)); } } public void testReadBytes() throws IOException { final byte[] array = newPreFilledByteArray(1000); assertThat(ByteStreams.readBytes(new ByteArrayInputStream(array), new TestByteProcessor())) .isEqualTo(array); } private static class TestByteProcessor implements ByteProcessor<byte[]> {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 21.9K bytes - Viewed (1) -
android/guava/src/com/google/common/io/Files.java
imports = "com.google.common.io.Files") @CanIgnoreReturnValue // some processors won't return a useful result @ParametricNullness public static <T extends @Nullable Object> T readBytes(File file, ByteProcessor<T> processor) throws IOException { return asByteSource(file).read(processor); } /** * Computes the hash code of the {@code file} using {@code hashFunction}. *
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 33.1K bytes - Viewed (0)