Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for TestInputStream (0.05 sec)

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

        assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed());
        assertArrayEquals(bytes, sink.getBytes());
      }
    
      public void testWriteFromStream_doesNotCloseThatStream() throws IOException {
        TestInputStream in = new TestInputStream(new ByteArrayInputStream(new byte[10]));
        assertFalse(in.closed());
        sink.writeFrom(in);
        assertFalse(in.closed());
      }
    
      public void testClosesOnErrors_copyingFromByteSourceThatThrows() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/ByteSinkTest.java

        assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed());
        assertArrayEquals(bytes, sink.getBytes());
      }
    
      public void testWriteFromStream_doesNotCloseThatStream() throws IOException {
        TestInputStream in = new TestInputStream(new ByteArrayInputStream(new byte[10]));
        assertFalse(in.closed());
        sink.writeFrom(in);
        assertFalse(in.closed());
      }
    
      public void testClosesOnErrors_copyingFromByteSourceThatThrows() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/io/TestReader.java

    /**
     * @author Colin Decker
     */
    @NullUnmarked
    public class TestReader extends FilterReader {
    
      private final TestInputStream in;
    
      public TestReader(TestOption... options) throws IOException {
        this(new TestInputStream(new ByteArrayInputStream(new byte[10]), options));
      }
    
      public TestReader(TestInputStream in) {
        super(new InputStreamReader(checkNotNull(in), UTF_8));
        this.in = in;
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/TestReader.java

    /**
     * @author Colin Decker
     */
    @NullUnmarked
    public class TestReader extends FilterReader {
    
      private final TestInputStream in;
    
      public TestReader(TestOption... options) throws IOException {
        this(new TestInputStream(new ByteArrayInputStream(new byte[10]), options));
      }
    
      public TestReader(TestInputStream in) {
        super(new InputStreamReader(checkNotNull(in), UTF_8));
        this.in = in;
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/io/CloseablesTest.java

        // when the mock does throw an exception.
        setupCloseable(true);
        doClose(mockCloseable, false);
      }
    
      public void testCloseQuietly_inputStreamWithEatenException() throws IOException {
        TestInputStream in =
            new TestInputStream(new ByteArrayInputStream(new byte[1]), TestOption.CLOSE_THROWS);
        Closeables.closeQuietly(in);
        assertTrue(in.closed());
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/TestByteSource.java

      }
    
      @Override
      public InputStream openStream() throws IOException {
        inputStreamOpened = true;
        return new RandomAmountInputStream(new In(), new Random());
      }
    
      private final class In extends TestInputStream {
    
        In() throws IOException {
          super(new ByteArrayInputStream(bytes), options);
        }
    
        @Override
        public void close() throws IOException {
          inputStreamClosed = true;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/TestByteSource.java

      }
    
      @Override
      public InputStream openStream() throws IOException {
        inputStreamOpened = true;
        return new RandomAmountInputStream(new In(), new Random());
      }
    
      private final class In extends TestInputStream {
    
        In() throws IOException {
          super(new ByteArrayInputStream(bytes), options);
        }
    
        @Override
        public void close() throws IOException {
          inputStreamClosed = true;
    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