- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for ByteSource (0.06 sec)
-
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 5.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/MultiInputStreamTest.java
joinHelper(1, 1, 1, 1, 1, 1, 1, 1); joinHelper(1, 0, 1, 0, 1, 0, 1, 0); } public void testOnlyOneOpen() throws Exception { ByteSource source = newByteSource(0, 50); int[] counter = new int[1]; ByteSource checker = new ByteSource() { @Override public InputStream openStream() throws IOException { if (counter[0]++ != 0) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 4.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 Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 1.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java
ByteSource source = out.asByteSource(); int chunk1 = min(dataSize, fileThreshold); int chunk2 = dataSize - chunk1; // Write just enough to not trip the threshold if (chunk1 > 0) { write(out, data, 0, chunk1, singleByte); assertTrue(ByteSource.wrap(data).slice(0, chunk1).contentEquals(source)); } File file = out.getFile();
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 5.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/MultiInputStreamTest.java
joinHelper(1, 1, 1, 1, 1, 1, 1, 1); joinHelper(1, 0, 1, 0, 1, 0, 1, 0); } public void testOnlyOneOpen() throws Exception { ByteSource source = newByteSource(0, 50); int[] counter = new int[1]; ByteSource checker = new ByteSource() { @Override public InputStream openStream() throws IOException { if (counter[0]++ != 0) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 4.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 Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 14:50:24 UTC 2024 - 1.5K bytes - Viewed (0) -
guava/src/com/google/common/io/Resources.java
private Resources() {} /** * Returns a {@link ByteSource} that reads from the given URL. * * @since 14.0 */ public static ByteSource asByteSource(URL url) { return new UrlByteSource(url); } /** A byte source that reads from a URL using {@link URL#openStream()}. */ private static final class UrlByteSource extends ByteSource { private final URL url;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 7.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java
ByteSource source = out.asByteSource(); int chunk1 = min(dataSize, fileThreshold); int chunk2 = dataSize - chunk1; // Write just enough to not trip the threshold if (chunk1 > 0) { write(out, data, 0, chunk1, singleByte); assertTrue(ByteSource.wrap(data).slice(0, chunk1).contentEquals(source)); } File file = out.getFile();
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 5.6K bytes - Viewed (0) -
android/guava/src/com/google/common/io/MultiInputStream.java
@GwtIncompatible final class MultiInputStream extends InputStream { private final Iterator<? extends ByteSource> it; private @Nullable InputStream in; /** * Creates a new instance. * * @param it an iterator of I/O suppliers that will provide each substream */ public MultiInputStream(Iterator<? extends ByteSource> it) throws IOException { this.it = checkNotNull(it); advance(); } @Override
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed May 14 19:40:47 UTC 2025 - 2.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/TestByteSource.java
import org.jspecify.annotations.NullUnmarked; /** * A byte source for testing that has configurable behavior. * * @author Colin Decker */ @NullUnmarked public final class TestByteSource extends ByteSource implements TestStreamSupplier { private final byte[] bytes; private final ImmutableSet<TestOption> options; private boolean inputStreamOpened; private boolean inputStreamClosed;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Jul 14 14:44:08 UTC 2025 - 2K bytes - Viewed (0)