- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for newPreFilledByteArray (0.08 sec)
-
android/guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java
FileBackedOutputStream out = new FileBackedOutputStream(/* fileThreshold= */ 10); ByteSource source = out.asByteSource(); byte[] chunk1 = newPreFilledByteArray(8); // Below threshold byte[] chunk2 = newPreFilledByteArray(5); // Crosses threshold byte[] chunk3 = newPreFilledByteArray(20); // More data to file out.write(chunk1); assertThat(out.getFile()).isNull(); out.write(chunk2);
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Oct 30 16:30:29 UTC 2025 - 6.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java
FileBackedOutputStream out = new FileBackedOutputStream(/* fileThreshold= */ 10); ByteSource source = out.asByteSource(); byte[] chunk1 = newPreFilledByteArray(8); // Below threshold byte[] chunk2 = newPreFilledByteArray(5); // Crosses threshold byte[] chunk3 = newPreFilledByteArray(20); // More data to file out.write(chunk1); assertThat(out.getFile()).isNull(); out.write(chunk2);
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Oct 30 16:30:29 UTC 2025 - 6.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/FilesTest.java
Files.write(I18N, temp, UTF_16LE); assertEquals(I18N, Files.toString(temp, UTF_16LE)); } public void testWriteBytes() throws IOException { File temp = createTempFile(); byte[] data = newPreFilledByteArray(2000); Files.write(data, temp); assertThat(Files.toByteArray(temp)).isEqualTo(data); assertThrows(NullPointerException.class, () -> Files.write(null, temp)); }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 18:44:53 UTC 2025 - 22.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/IoTestCase.java
} /** Returns a byte array of length size that has values 0 .. size - 1. */ static byte[] newPreFilledByteArray(int size) { return newPreFilledByteArray(0, size); } /** Returns a byte array of length size that has values offset .. offset + size - 1. */ static byte[] newPreFilledByteArray(int offset, int size) { byte[] array = new byte[size]; for (int i = 0; i < size; i++) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 5.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/MultiInputStreamTest.java
Collections.singleton( new ByteSource() { @Override public InputStream openStream() { return new ByteArrayInputStream(newPreFilledByteArray(0, 50)) { @Override public long skip(long n) { return 0; } };
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 18:44:53 UTC 2025 - 4.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/MultiInputStreamTest.java
Collections.singleton( new ByteSource() { @Override public InputStream openStream() { return new ByteArrayInputStream(newPreFilledByteArray(0, 50)) { @Override public long skip(long n) { return 0; } };
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 18:44:53 UTC 2025 - 4.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/FileBackedOutputStreamAndroidIncompatibleTest.java
@NullUnmarked public class FileBackedOutputStreamAndroidIncompatibleTest extends IoTestCase { public void testFinalizeDeletesFile() throws Exception { byte[] data = newPreFilledByteArray(100); FileBackedOutputStream out = new FileBackedOutputStream(0, true); write(out, data, 0, 100, true); File file = out.getFile(); assertEquals(100, file.length()); assertTrue(file.exists());Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 1.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/FilesTest.java
Files.write(I18N, temp, UTF_16LE); assertEquals(I18N, Files.toString(temp, UTF_16LE)); } public void testWriteBytes() throws IOException { File temp = createTempFile(); byte[] data = newPreFilledByteArray(2000); Files.write(data, temp); assertThat(Files.toByteArray(temp)).isEqualTo(data); assertThrows(NullPointerException.class, () -> Files.write(null, temp)); }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 18:44:53 UTC 2025 - 22.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteSinkTest.java
/** * Tests for the default implementations of {@code ByteSink} methods. * * @author Colin Decker */ @NullUnmarked public class ByteSinkTest extends IoTestCase { private final byte[] bytes = newPreFilledByteArray(10000); private TestByteSink sink; @Override protected void setUp() throws Exception { sink = new TestByteSink(); } public void testOpenBufferedStream() throws IOException {Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 3.8K bytes - Viewed (0)