- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 25 for ByteSource (0.16 sec)
-
guava/src/com/google/common/io/CharSource.java
* be an empty line at the end if the contents are terminated with a line separator. * * <p>Any {@link ByteSource} containing text encoded with a specific {@linkplain Charset character * encoding} may be viewed as a {@code CharSource} using {@link ByteSource#asCharSource(Charset)}. * * <p><b>Note:</b> In general, {@code CharSource} is intended to be used for "file-like" sources
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 25.3K 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/FilesTest.java
suite.addTestSuite(FilesTest.class); return suite; } public void testRoundTripSources() throws Exception { File asciiFile = getTestFile("ascii.txt"); ByteSource byteSource = Files.asByteSource(asciiFile); assertSame(byteSource, byteSource.asCharSource(UTF_8).asByteSource(UTF_8)); } public void testToByteArray() throws IOException { File asciiFile = getTestFile("ascii.txt");
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Jul 14 14:44:08 UTC 2025 - 22.1K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java
.put(FloatBuffer.class, FloatBuffer.allocate(0)) .put(DoubleBuffer.class, DoubleBuffer.allocate(0)) .put(File.class, new File("")) .put(ByteSource.class, ByteSource.empty()) .put(CharSource.class, CharSource.empty()) .put(ByteSink.class, NullByteSink.INSTANCE) .put(CharSink.class, NullByteSink.INSTANCE.asCharSink(UTF_8))
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 20.9K bytes - Viewed (0) -
guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java
assertFreshInstanceReturned( ByteArrayOutputStream.class, OutputStream.class, Writer.class, StringWriter.class, PrintStream.class, PrintWriter.class); assertEquals(ByteSource.empty(), ArbitraryInstances.get(ByteSource.class)); assertEquals(CharSource.empty(), ArbitraryInstances.get(CharSource.class)); assertNotNull(ArbitraryInstances.get(ByteSink.class)); assertNotNull(ArbitraryInstances.get(CharSink.class));
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 22.3K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/ArbitraryInstances.java
.put(FloatBuffer.class, FloatBuffer.allocate(0)) .put(DoubleBuffer.class, DoubleBuffer.allocate(0)) .put(File.class, new File("")) .put(ByteSource.class, ByteSource.empty()) .put(CharSource.class, CharSource.empty()) .put(ByteSink.class, NullByteSink.INSTANCE) .put(CharSink.class, NullByteSink.INSTANCE.asCharSink(UTF_8))
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 21.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/FilesTest.java
suite.addTestSuite(FilesTest.class); return suite; } public void testRoundTripSources() throws Exception { File asciiFile = getTestFile("ascii.txt"); ByteSource byteSource = Files.asByteSource(asciiFile); assertSame(byteSource, byteSource.asCharSource(UTF_8).asByteSource(UTF_8)); } public void testToByteArray() throws IOException { File asciiFile = getTestFile("ascii.txt");
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Jul 14 14:44:08 UTC 2025 - 22.1K 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) -
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)