- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for AsCharSource (0.04 sec)
-
guava/src/com/google/common/io/Resources.java
} } /** * 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. * * @param url the URL to read from * @return a byte array containing all the bytes from the 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) -
android/guava/src/com/google/common/io/Files.java
* @throws IOException if an I/O error occurs * @deprecated Prefer {@code asCharSource(file, charset).read()}. */ @Deprecated @InlineMe( replacement = "Files.asCharSource(file, charset).read()", imports = "com.google.common.io.Files") public static String toString(File file, Charset charset) throws IOException { return asCharSource(file, charset).read(); } /**
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 32.9K bytes - Viewed (0) -
guava/src/com/google/common/io/Files.java
* @throws IOException if an I/O error occurs * @deprecated Prefer {@code asCharSource(file, charset).read()}. */ @Deprecated @InlineMe( replacement = "Files.asCharSource(file, charset).read()", imports = "com.google.common.io.Files") public static String toString(File file, Charset charset) throws IOException { return asCharSource(file, charset).read(); } /**
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 17:27:14 UTC 2025 - 32.9K bytes - Viewed (0) -
android/guava/src/com/google/common/io/CharSource.java
AsByteSource(Charset charset) { this.charset = checkNotNull(charset); } @Override public CharSource asCharSource(Charset charset) { if (charset.equals(this.charset)) { return CharSource.this; } return super.asCharSource(charset); } @Override public InputStream openStream() throws IOException {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 25.7K bytes - Viewed (0) -
guava/src/com/google/common/io/CharSource.java
AsByteSource(Charset charset) { this.charset = checkNotNull(charset); } @Override public CharSource asCharSource(Charset charset) { if (charset.equals(this.charset)) { return CharSource.this; } return super.asCharSource(charset); } @Override public InputStream openStream() throws IOException {
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/SourceSinkFactories.java
checkNotNull(factory); return new CharSourceFactory() { @Override public CharSource createSource(String string) throws IOException { return factory.createSource(string.getBytes(UTF_8)).asCharSource(UTF_8); } @Override public String getExpected(String data) { return new String(factory.getExpected(data.getBytes(UTF_8)), UTF_8); } @Override
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 17.9K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ByteSource.java
* returned, rather than round-trip encoding. Subclasses that override this method should behave * the same way. */ public CharSource asCharSource(Charset charset) { return new AsCharSource(charset); } /** * Opens a new {@link InputStream} for reading from this source. This method returns a new, * independent stream each time it is called. *
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Mar 20 20:55:20 UTC 2025 - 25.7K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java
import java.io.InputStreamReader; import java.nio.charset.Charset; import java.util.Random; import org.jspecify.annotations.NullUnmarked; /** * Benchmarks for various potential implementations of {@code ByteSource.asCharSource(...).read()}. */ // These benchmarks allocate a lot of data so use a large heap @VmOptions({"-Xms12g", "-Xmx12g", "-d64"}) @NullUnmarked public class ByteSourceAsCharSourceReadBenchmark { enum ReadStrategy {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 5.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/FilesTest.java
suite.addTest( ByteSinkTester.tests( "Files.asByteSink[File, APPEND]", SourceSinkFactories.appendingFileByteSinkFactory())); suite.addTest( CharSourceTester.tests( "Files.asCharSource[File, Charset]", SourceSinkFactories.fileCharSourceFactory(), false)); suite.addTest( CharSinkTester.tests(
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Jul 14 14:44:08 UTC 2025 - 22.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ResourcesTest.java
suite.addTest( ByteSourceTester.tests( "Resources.asByteSource[URL]", SourceSinkFactories.urlByteSourceFactory(), true)); suite.addTest( CharSourceTester.tests( "Resources.asCharSource[URL, Charset]", SourceSinkFactories.urlCharSourceFactory(), false)); suite.addTestSuite(ResourcesTest.class); return suite; } public void testToString() throws IOException {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed May 14 19:40:47 UTC 2025 - 6.9K bytes - Viewed (0)