@Test public void do_close() throws Exception { ByteCountingInputStream s = new ByteCountingInputStream(istream); s.close(); verify(istream, times(1)).close(); verifyNoMoreInteractions(istream); }
@Override public void close() throws IOException { if (propagate_close_) in_.close(); }
ByteCountingInputStream extends InputStream { @Override public void close() throws IOException { if (propagate_close_) in_.close(); } }
ByteCountingInputStream extends InputStream { @Override public void close() throws IOException { if (propagate_close_) in_.close(); } ByteCountingInputStream(InputStream in, boolean propagate_close);  ByteCountingInputStream(InputStream in); }
ByteCountingInputStream extends InputStream { @Override public void close() throws IOException { if (propagate_close_) in_.close(); } ByteCountingInputStream(InputStream in, boolean propagate_close);  ByteCountingInputStream(InputStream in); long getBytesRead(); @Override int read(); @Override int read(byte b[]); @Override int read(byte b[], int off, int len); @Override long skip(long n); @Override int available(); @Override void close(); @Override synchronized void mark(int readlimit); @Override synchronized void reset(); @Override boolean markSupported(); }
ByteCountingInputStream extends InputStream { @Override public void close() throws IOException { if (propagate_close_) in_.close(); } ByteCountingInputStream(InputStream in, boolean propagate_close);  ByteCountingInputStream(InputStream in); long getBytesRead(); @Override int read(); @Override int read(byte b[]); @Override int read(byte b[], int off, int len); @Override long skip(long n); @Override int available(); @Override void close(); @Override synchronized void mark(int readlimit); @Override synchronized void reset(); @Override boolean markSupported();  }