@Test public void flush() throws Exception { releasableOutputStream.flush(); assertFalse(wasCalled.get()); }
@Override public void flush() throws IOException { try { delegate.flush(); } catch (IOException e) { safeClose(); isClosed = true; } }
ReleasableOutputStream extends OutputStream { @Override public void flush() throws IOException { try { delegate.flush(); } catch (IOException e) { safeClose(); isClosed = true; } } }
ReleasableOutputStream extends OutputStream { @Override public void flush() throws IOException { try { delegate.flush(); } catch (IOException e) { safeClose(); isClosed = true; } } ReleasableOutputStream(OutputStream delegate, Runnable onClose); }
ReleasableOutputStream extends OutputStream { @Override public void flush() throws IOException { try { delegate.flush(); } catch (IOException e) { safeClose(); isClosed = true; } } ReleasableOutputStream(OutputStream delegate, Runnable onClose); @Override void write(int b); @Override void write(byte[] b); @Override void write(byte[] b, int off, int len); @Override void flush(); @Override void close(); }
ReleasableOutputStream extends OutputStream { @Override public void flush() throws IOException { try { delegate.flush(); } catch (IOException e) { safeClose(); isClosed = true; } } ReleasableOutputStream(OutputStream delegate, Runnable onClose); @Override void write(int b); @Override void write(byte[] b); @Override void write(byte[] b, int off, int len); @Override void flush(); @Override void close();  }