Class TempFileOutputStream

java.lang.Object
java.io.OutputStream
de.intarsys.tools.stream.TempFileOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class TempFileOutputStream extends OutputStream
A stream wrapper that deferrs writing to the final destination until the stream is closed. The output is written to a temporary file in the destinations directory. When the stream is closed, the temp file is copied to the destination and deleted.