- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for CharSource (0.06 sec)
-
guava-tests/test/com/google/common/io/MultiReaderTest.java
String testString = "abcdefgh"; CharSource source = newCharSource(testString); Reader joinedReader = CharSource.concat(source, source).openStream(); String expectedString = testString + testString; assertEquals(expectedString, CharStreams.toString(joinedReader)); } private static CharSource newCharSource(String text) { return new CharSource() { @Override public Reader openStream() {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 3.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CharSourceTester.java
* Generates tests of all methods on a {@code CharSource} given various inputs the source is * expected to contain. * * @author Colin Decker */ @AndroidIncompatible // TODO(b/230620681): Make this available (even though we won't run it). @NullUnmarked public class CharSourceTester extends SourceSinkTester<CharSource, String, CharSourceFactory> {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 6.9K bytes - Viewed (0) -
guava/src/com/google/common/io/package-info.java
* 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) -
android/guava/src/com/google/common/io/MultiReader.java
* * @author Bin Zhu * @since 1.0 */ @J2ktIncompatible @GwtIncompatible final class MultiReader extends Reader { private final Iterator<? extends CharSource> it; private @Nullable Reader current; MultiReader(Iterator<? extends CharSource> readers) throws IOException { this.it = readers; advance(); } /** Closes the current reader and opens the next one, if any. */
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:37:28 UTC 2025 - 2.4K bytes - Viewed (0) -
guava/src/com/google/common/io/Resources.java
@Override public String toString() { return "Resources.asByteSource(" + url + ")"; } } /** * Returns a {@link CharSource} that reads from the given URL using the given character set. * * @since 14.0 */ public static CharSource asCharSource(URL url, Charset charset) { return asByteSource(url).asCharSource(charset); } /** * Reads all bytes from a URL into a byte array.
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 7.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/TestCharSource.java
import java.io.Reader; import org.jspecify.annotations.NullUnmarked; /** * A char source for testing that has configurable options. * * @author Colin Decker */ @NullUnmarked public class TestCharSource extends CharSource implements TestStreamSupplier { private final TestByteSource byteSource; public TestCharSource(String content, TestOption... options) { this.byteSource = new TestByteSource(content.getBytes(UTF_8), options);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 1.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/SourceSinkTester.java
@Override public String getName() { return super.getName() + " [" + suiteName + " [" + caseDesc + "]]"; } protected static ImmutableList<String> getLines(String string) { try { return new CharSource() { @Override public Reader openStream() throws IOException { return new StringReader(string); } }.readLines(); } catch (IOException e) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 4.9K bytes - Viewed (0)