@Test public void testClose() throws IOException { shielded.close(); assertFalse("closed", closed); assertEquals("read()", -1, shielded.read()); assertEquals("read()", data[0], original.read()); }
@Override public void close() { in = new ClosedInputStream(); }
CloseShieldInputStream extends ProxyInputStream { @Override public void close() { in = new ClosedInputStream(); } }
CloseShieldInputStream extends ProxyInputStream { @Override public void close() { in = new ClosedInputStream(); } CloseShieldInputStream(final InputStream in); }
CloseShieldInputStream extends ProxyInputStream { @Override public void close() { in = new ClosedInputStream(); } CloseShieldInputStream(final InputStream in); @Override void close(); }
CloseShieldInputStream extends ProxyInputStream { @Override public void close() { in = new ClosedInputStream(); } CloseShieldInputStream(final InputStream in); @Override void close();  }