- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for nullOutputStream (0.22 sec)
-
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(Charsets.US_ASCII); nos.write(bytes); nos.write(bytes, 2, 10); nos.write(bytes, bytes.length - 5, 5); // nothing really to assert? assertSame(ByteStreams.nullOutputStream(), ByteStreams.nullOutputStream()); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 21.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/TestWriter.java
/** @author Colin Decker */ 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
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 1.7K bytes - Viewed (0) -
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(Charsets.US_ASCII); nos.write(bytes); nos.write(bytes, 2, 10); nos.write(bytes, bytes.length - 5, 5); // nothing really to assert? assertSame(ByteStreams.nullOutputStream(), ByteStreams.nullOutputStream()); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 21.9K bytes - Viewed (0) -
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() {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 16.9K bytes - Viewed (0) -
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() {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 16.9K bytes - Viewed (0) -
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. * * @since 14.0 (since 1.0 as com.google.common.io.NullOutputStream) */ public static OutputStream nullOutputStream() { return NULL_OUTPUT_STREAM; } /**
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Jan 17 18:59:58 GMT 2024 - 29.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/TestWriter.java
/** @author Colin Decker */ 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
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Dec 04 17:37:03 GMT 2017 - 1.7K bytes - Viewed (0) -
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.
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Apr 17 16:33:44 GMT 2024 - 21K bytes - Viewed (1) -
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.
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Apr 17 16:33:44 GMT 2024 - 20.5K bytes - Viewed (0)