Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for TestInputStream (0.28 sec)

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

    import java.util.Arrays;
    
    /** @author Colin Decker */
    public class TestInputStream extends FilterInputStream {
    
      private final ImmutableSet<TestOption> options;
      private boolean closed;
    
      public TestInputStream(InputStream in, TestOption... options) throws IOException {
        this(in, Arrays.asList(options));
      }
    
      public TestInputStream(InputStream in, Iterable<TestOption> options) throws IOException {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/io/TestInputStream.java

    import java.util.Arrays;
    
    /** @author Colin Decker */
    public class TestInputStream extends FilterInputStream {
    
      private final ImmutableSet<TestOption> options;
      private boolean closed;
    
      public TestInputStream(InputStream in, TestOption... options) throws IOException {
        this(in, Arrays.asList(options));
      }
    
      public TestInputStream(InputStream in, Iterable<TestOption> options) throws IOException {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.5K bytes
    - Viewed (0)
  3. 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() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  4. 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() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/io/TestReader.java

    /** @author Colin Decker */
    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;
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.3K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/io/TestReader.java

    /** @author Colin Decker */
    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;
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 1.3K bytes
    - Viewed (0)
  7. 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());
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4K bytes
    - Viewed (0)
  8. 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 {
    
        public In() throws IOException {
          super(new ByteArrayInputStream(bytes), options);
        }
    
        @Override
        public void close() throws IOException {
          inputStreamClosed = true;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Sep 15 13:47:32 GMT 2016
    - 1.9K bytes
    - Viewed (0)
  9. 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());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4K bytes
    - Viewed (0)
  10. 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 {
    
        public In() throws IOException {
          super(new ByteArrayInputStream(bytes), options);
        }
    
        @Override
        public void close() throws IOException {
          inputStreamClosed = true;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Apr 21 02:27:51 GMT 2017
    - 1.9K bytes
    - Viewed (0)
Back to top