public class BackupFileOutputStream extends FileOutputStream
BackupFileWriter
Modifier and Type | Field and Description |
---|---|
private File |
backupFile |
private boolean |
closed |
private File |
file |
private File |
tempFile |
Constructor and Description |
---|
BackupFileOutputStream(File file)
Create a new
BackupFileOutputStream for the given file. |
BackupFileOutputStream(String file)
Create a new
BackupFileOutputStream for the given file. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the output stream.
|
private static File |
getTempFile(File file) |
finalize, getChannel, getFD, write, write, write
flush
private File backupFile
private boolean closed
public BackupFileOutputStream(File file) throws FileNotFoundException
BackupFileOutputStream
for the given file.file
- The file to write.FileNotFoundException
- If the temporary file could not be
opened for writing.public BackupFileOutputStream(String file) throws FileNotFoundException
BackupFileOutputStream
for the given file.file
- The path of the file to write.FileNotFoundException
- If the temporary file could not be
opened for writing.public final void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FileOutputStream
IOException
- If an I/O error occurs.private static File getTempFile(File file)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses