@Test public void testSwapFileOutputStreamFile_01() throws IOException { String tmpDir = System.getProperty("java.io.tmpdir"); File file = new File(tmpDir + "/SwapFileOutputStreamTest.swp"); if (file.exists()) { file.delete(); } SwapFileOutputStream sfos = new SwapFileOutputStream(file); assertTrue("01", file.isFile()); sfos.close(); }
@Override public void close() throws IOException { if (!closed) { out.close(); closed = true; } }
SwapFileOutputStream extends SwapOutputStream { @Override public void close() throws IOException { if (!closed) { out.close(); closed = true; } } }
SwapFileOutputStream extends SwapOutputStream { @Override public void close() throws IOException { if (!closed) { out.close(); closed = true; } } SwapFileOutputStream(File swapFile);  SwapFileOutputStream(File swapFile, int treshold); }
SwapFileOutputStream extends SwapOutputStream { @Override public void close() throws IOException { if (!closed) { out.close(); closed = true; } } SwapFileOutputStream(File swapFile);  SwapFileOutputStream(File swapFile, int treshold); static SwapFileOutputStream newInstance(); static SwapFileOutputStream newInstance(int treshold); void collect(OutputStream bucket); @Override void close(); void cleanupAndClose(); }
SwapFileOutputStream extends SwapOutputStream { @Override public void close() throws IOException { if (!closed) { out.close(); closed = true; } } SwapFileOutputStream(File swapFile);  SwapFileOutputStream(File swapFile, int treshold); static SwapFileOutputStream newInstance(); static SwapFileOutputStream newInstance(int treshold); void collect(OutputStream bucket); @Override void close(); void cleanupAndClose();  }