- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for TestInputStream (2.01 sec)
-
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 {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 2.5K bytes - Viewed (0) -
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 {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 2.5K bytes - Viewed (0) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 3.7K bytes - Viewed (0) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 3.7K bytes - Viewed (0) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4K bytes - Viewed (0) -
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; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 1.3K bytes - Viewed (0) -
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; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 1.3K bytes - Viewed (0) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4K bytes - Viewed (0) -
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;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Apr 21 02:27:51 UTC 2017 - 1.9K bytes - Viewed (0) -
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;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Sep 15 13:47:32 UTC 2016 - 1.9K bytes - Viewed (0)