Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 19 of 19 for CharSource (0.55 sec)

  1. 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)
  2. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

              .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))
              // All collections are immutable empty. So safe for any type parameter.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 20.9K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/ByteSource.java

    public abstract class ByteSource {
    
      /** Constructor for use by subclasses. */
      protected ByteSource() {}
    
      /**
       * Returns a {@link CharSource} view of this byte source that decodes bytes read from this source
       * as characters using the given {@link Charset}.
       *
       * <p>If {@link CharSource#asByteSource} is called on the returned source with the same charset,
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Mar 20 20:55:20 UTC 2025
    - 25.7K bytes
    - Viewed (0)
  4. guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java

            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));
      }
    
      public void testGet_reflect() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 22.3K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

              .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))
              // All collections are immutable empty. So safe for any type parameter.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 21.4K bytes
    - Viewed (0)
  6. android/guava-testlib/test/com/google/common/testing/ArbitraryInstancesTest.java

            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));
      }
    
      public void testGet_reflect() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 21.8K bytes
    - Viewed (0)
  7. 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)
  8. android/guava/src/com/google/common/io/Files.java

          return "Files.asByteSink(" + file + ", " + modes + ")";
        }
      }
    
      /**
       * Returns a new {@link CharSource} for reading character data from the given file using the given
       * character set.
       *
       * @since 14.0
       */
      public static CharSource asCharSource(File file, Charset charset) {
        return asByteSource(file).asCharSource(charset);
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 32.9K bytes
    - Viewed (0)
  9. guava/src/com/google/common/io/Files.java

          return "Files.asByteSink(" + file + ", " + modes + ")";
        }
      }
    
      /**
       * Returns a new {@link CharSource} for reading character data from the given file using the given
       * character set.
       *
       * @since 14.0
       */
      public static CharSource asCharSource(File file, Charset charset) {
        return asByteSource(file).asCharSource(charset);
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 32.9K bytes
    - Viewed (0)
Back to top