- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 30 for ByteSource (0.1 sec)
-
android/guava/src/com/google/common/io/ByteSource.java
* * @param sources the sources to concatenate * @return a {@code ByteSource} containing the concatenated data * @since 15.0 */ public static ByteSource concat(Iterable<? extends ByteSource> sources) { return new ConcatenatedByteSource(sources); } /** * Concatenates multiple {@link ByteSource} instances into a single source. Streams returned from
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 26.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteSourceTest.java
public void testConcat() throws IOException { ByteSource b1 = ByteSource.wrap(new byte[] {0, 1, 2, 3}); ByteSource b2 = ByteSource.wrap(new byte[0]); ByteSource b3 = ByteSource.wrap(new byte[] {4, 5}); byte[] expected = {0, 1, 2, 3, 4, 5}; assertArrayEquals(expected, ByteSource.concat(ImmutableList.of(b1, b2, b3)).read()); assertArrayEquals(expected, ByteSource.concat(b1, b2, b3).read());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 15.4K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java
} else { return TO_BYTE_ARRAY_NEW_STRING.read(byteSource, cs); } } }; abstract String read(ByteSource byteSource, Charset cs) throws IOException; } @Param({"UTF-8"}) String charsetName; @Param ReadStrategy strategy; @Param({"10", "1024", "1048576"}) int size; Charset charset; ByteSource data; @BeforeExperiment public void setUp() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 5.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteSourceTester.java
} // Test that you can not expand the readable data in a previously sliced ByteSource. public void testSlice_constrainedRange() throws IOException { long size = source.read().length; if (size >= 2) { ByteSource sliced = source.slice(1, size - 2); assertEquals(size - 2, sliced.read().length); ByteSource resliced = sliced.slice(0, size - 1); assertTrue(sliced.contentEquals(resliced)); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 8.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/TestCharSource.java
private final TestByteSource byteSource; public TestCharSource(String content, TestOption... options) { this.byteSource = new TestByteSource(content.getBytes(UTF_8), options); } @Override public boolean wasStreamOpened() { return byteSource.wasStreamOpened(); } @Override public boolean wasStreamClosed() { return byteSource.wasStreamClosed(); } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 1.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/TestCharSource.java
private final TestByteSource byteSource; public TestCharSource(String content, TestOption... options) { this.byteSource = new TestByteSource(content.getBytes(UTF_8), options); } @Override public boolean wasStreamOpened() { return byteSource.wasStreamOpened(); } @Override public boolean wasStreamClosed() { return byteSource.wasStreamClosed(); } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 1.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/ByteSourceTest.java
public void testConcat() throws IOException { ByteSource b1 = ByteSource.wrap(new byte[] {0, 1, 2, 3}); ByteSource b2 = ByteSource.wrap(new byte[0]); ByteSource b3 = ByteSource.wrap(new byte[] {4, 5}); byte[] expected = {0, 1, 2, 3, 4, 5}; assertArrayEquals(expected, ByteSource.concat(ImmutableList.of(b1, b2, b3)).read()); assertArrayEquals(expected, ByteSource.concat(b1, b2, b3).read());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 15.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/SourceSinkFactories.java
@Override public void tearDown() throws IOException {} } private static class ByteArraySourceFactory implements ByteSourceFactory { @Override public ByteSource createSource(byte[] bytes) throws IOException { return ByteSource.wrap(bytes); } @Override public byte[] getExpected(byte[] bytes) { return bytes; } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 12.6K bytes - Viewed (0) -
guava/src/com/google/common/io/package-info.java
* the License. */ /** * Utility methods and classes for I/O; for example input streams, output streams, readers, writers, * and files. * * <p>At the core of this package are the Source/Sink types: {@link ByteSource ByteSource}, {@link * CharSource CharSource}, {@link ByteSink ByteSink} and {@link CharSink CharSink}. They are * factories for I/O streams that provide many convenience methods that handle both opening and * closing streams for you.
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Jun 23 19:57:03 UTC 2023 - 1.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/SourceSinkFactories.java
@Override public void tearDown() throws IOException {} } private static class ByteArraySourceFactory implements ByteSourceFactory { @Override public ByteSource createSource(byte[] bytes) throws IOException { return ByteSource.wrap(bytes); } @Override public byte[] getExpected(byte[] bytes) { return bytes; } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 17.7K bytes - Viewed (0)