Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for ByteSource (0.05 sec)

  1. guava-tests/test/com/google/common/io/SourceSinkFactories.java

        @Override
        public void tearDown() throws IOException {}
      }
    
      private static class ByteArraySourceFactory implements ByteSourceFactory {
    
        @Override
        public ByteSource createSource(byte[] bytes) throws IOException {
          return ByteSource.wrap(bytes);
        }
    
        @Override
        public byte[] getExpected(byte[] bytes) {
          return bytes;
        }
    
        @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)
  2. android/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.7K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top