Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for asCharSource (0.08 sec)

  1. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Aug 02 13:50:22 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  2. android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.nio.charset.Charset;
    import java.util.Random;
    
    /**
     * 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"})
    public class ByteSourceAsCharSourceReadBenchmark {
      enum ReadStrategy {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 10 19:45:10 UTC 2022
    - 5.2K bytes
    - Viewed (0)
  3. android/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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/ByteSourceTester.java

        CharSourceFactory charSourceFactory = SourceSinkFactories.asCharSourceFactory(factory);
        suite.addTest(
            CharSourceTester.suiteForString(
                charSourceFactory, string, name + ".asCharSource[Charset]", desc));
        return suite;
      }
    
      static TestSuite suiteForBytes(
          ByteSourceFactory factory, byte[] bytes, String name, String desc, boolean slice) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  5. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 6.8K bytes
    - Viewed (0)
Back to top