Package org.javlo.io
Class TransactionFile
- java.lang.Object
-
- org.javlo.io.TransactionFile
-
public class TransactionFile extends Object
class for overwrite data on a file, with temp file. Data will never only in memory.- Author:
- pvandermaesen
-
-
Constructor Summary
Constructors Constructor Description TransactionFile(File targetFile)
TransactionFile(File targetFile, boolean copySourceInInternalFile)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
commit()
OutputStream
getOutputStream()
File
getTempFile()
void
init(File targetFile, boolean copySourceInInternalFile)
static void
main(String[] args)
void
rollback()
-
-
-
Constructor Detail
-
TransactionFile
public TransactionFile(File targetFile) throws IOException
- Throws:
IOException
-
TransactionFile
public TransactionFile(File targetFile, boolean copySourceInInternalFile) throws IOException
- Throws:
IOException
-
-
Method Detail
-
init
public void init(File targetFile, boolean copySourceInInternalFile) throws IOException
- Throws:
IOException
-
getOutputStream
public OutputStream getOutputStream()
-
getTempFile
public File getTempFile()
-
commit
public void commit()
-
rollback
public void rollback() throws IOException
- Throws:
IOException
-
main
public static void main(String[] args)
-
-