Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 9 of 9 for NullOutputStream (0.15 seconds)

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

        OutputStream nos = ByteStreams.nullOutputStream();
        // write to the output stream
        nos.write('n');
        String test = "Test string for NullOutputStream";
        byte[] bytes = test.getBytes(US_ASCII);
        nos.write(bytes);
        nos.write(bytes, 2, 10);
        nos.write(bytes, bytes.length - 5, 5);
        // nothing really to assert?
        assertThat(ByteStreams.nullOutputStream()).isSameInstanceAs(ByteStreams.nullOutputStream());
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 19:26:39 GMT 2026
    - 22K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/io/ByteStreamsTest.java

        OutputStream nos = ByteStreams.nullOutputStream();
        // write to the output stream
        nos.write('n');
        String test = "Test string for NullOutputStream";
        byte[] bytes = test.getBytes(US_ASCII);
        nos.write(bytes);
        nos.write(bytes, 2, 10);
        nos.write(bytes, bytes.length - 5, 5);
        // nothing really to assert?
        assertThat(ByteStreams.nullOutputStream()).isSameInstanceAs(ByteStreams.nullOutputStream());
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 19:26:39 GMT 2026
    - 22K bytes
    - Click Count (0)
  3. android/guava/src/com/google/common/io/ByteStreams.java

            }
    
            @Override
            public String toString() {
              return "ByteStreams.nullOutputStream()";
            }
          };
    
      /**
       * Returns an {@link OutputStream} that simply discards written bytes.
       *
       * <p><b>Java 11+ users:</b> use {@link OutputStream#nullOutputStream()} instead. Note that the
       * {@link ByteStreams} method returns a singleton stream whose {@code close} method has no effect,
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 23 21:06:42 GMT 2026
    - 31.1K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/io/ByteSourceTest.java

        assertArrayEquals(expected, slice.read());
      }
    
      public void testCopyToStream_doesNotCloseThatStream() throws IOException {
        TestOutputStream out = new TestOutputStream(ByteStreams.nullOutputStream());
        assertFalse(out.closed());
        source.copyTo(out);
        assertFalse(out.closed());
      }
    
      public void testClosesOnErrors_copyingToByteSinkThatThrows() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 19 18:53:45 GMT 2026
    - 15.6K bytes
    - Click Count (0)
  5. guava-tests/test/com/google/common/io/TestWriter.java

     */
    @NullUnmarked
    public class TestWriter extends FilterWriter {
    
      private final TestOutputStream out;
    
      public TestWriter(TestOption... options) throws IOException {
        this(new TestOutputStream(ByteStreams.nullOutputStream(), options));
      }
    
      public TestWriter(TestOutputStream out) {
        super(new OutputStreamWriter(checkNotNull(out), UTF_8));
        this.out = out;
      }
    
      @Override
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Dec 19 18:03:30 GMT 2024
    - 1.7K bytes
    - Click Count (0)
  6. android/guava-tests/test/com/google/common/io/ByteSourceTest.java

        assertArrayEquals(expected, slice.read());
      }
    
      public void testCopyToStream_doesNotCloseThatStream() throws IOException {
        TestOutputStream out = new TestOutputStream(ByteStreams.nullOutputStream());
        assertFalse(out.closed());
        source.copyTo(out);
        assertFalse(out.closed());
      }
    
      public void testClosesOnErrors_copyingToByteSinkThatThrows() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 19 18:53:45 GMT 2026
    - 15.6K bytes
    - Click Count (0)
  7. android/guava-tests/test/com/google/common/io/TestWriter.java

     */
    @NullUnmarked
    public class TestWriter extends FilterWriter {
    
      private final TestOutputStream out;
    
      public TestWriter(TestOption... options) throws IOException {
        this(new TestOutputStream(ByteStreams.nullOutputStream(), options));
      }
    
      public TestWriter(TestOutputStream out) {
        super(new OutputStreamWriter(checkNotNull(out), UTF_8));
        this.out = out;
      }
    
      @Override
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Dec 19 18:03:30 GMT 2024
    - 1.7K bytes
    - Click Count (0)
  8. guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

        private static final NullByteSink INSTANCE = new NullByteSink();
    
        @Override
        public OutputStream openStream() {
          return ByteStreams.nullOutputStream();
        }
      }
    
      // Compare by toString() to satisfy 2 properties:
      // 1. compareTo(null) should throw NullPointerException
      // 2. the order is deterministic and easy to understand, for debugging purpose.
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Sep 23 17:50:58 GMT 2025
    - 21.4K bytes
    - Click Count (0)
  9. android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java

        private static final NullByteSink INSTANCE = new NullByteSink();
    
        @Override
        public OutputStream openStream() {
          return ByteStreams.nullOutputStream();
        }
      }
    
      // Compare by toString() to satisfy 2 properties:
      // 1. compareTo(null) should throw NullPointerException
      // 2. the order is deterministic and easy to understand, for debugging purpose.
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Sep 23 17:50:58 GMT 2025
    - 20.9K bytes
    - Click Count (0)
Back to Top