@Test public void testClosedOutputStream_doesNotThrowOnFlush() throws IOException { JimfsOutputStream out = newOutputStream(false); out.close(); out.flush(); try (JimfsOutputStream out2 = newOutputStream(false); BufferedOutputStream bout = new BufferedOutputStream(out2); OutputStreamWriter writer = new OutputStreamWriter(bout, UTF_8)) { } }
@Override public synchronized void close() throws IOException { if (isOpen()) { fileSystemState.unregister(this); file.closed(); file = null; } }
JimfsOutputStream extends OutputStream { @Override public synchronized void close() throws IOException { if (isOpen()) { fileSystemState.unregister(this); file.closed(); file = null; } } }
JimfsOutputStream extends OutputStream { @Override public synchronized void close() throws IOException { if (isOpen()) { fileSystemState.unregister(this); file.closed(); file = null; } } JimfsOutputStream(RegularFile file, boolean append, FileSystemState fileSystemState); }
JimfsOutputStream extends OutputStream { @Override public synchronized void close() throws IOException { if (isOpen()) { fileSystemState.unregister(this); file.closed(); file = null; } } JimfsOutputStream(RegularFile file, boolean append, FileSystemState fileSystemState); @Override synchronized void write(int b); @Override void write(byte[] b); @Override void write(byte[] b, int off, int len); @Override synchronized void close(); }
JimfsOutputStream extends OutputStream { @Override public synchronized void close() throws IOException { if (isOpen()) { fileSystemState.unregister(this); file.closed(); file = null; } } JimfsOutputStream(RegularFile file, boolean append, FileSystemState fileSystemState); @Override synchronized void write(int b); @Override void write(byte[] b); @Override void write(byte[] b, int off, int len); @Override synchronized void close();  }