public class BackupFileWriter extends FileWriter
BackupFileOutputStream
Modifier and Type | Field and Description |
---|---|
private File |
backupFile |
private boolean |
closed |
private File |
file |
private File |
tempFile |
Constructor and Description |
---|
BackupFileWriter(File file)
Create a new
BackupFileWriter for the given file. |
BackupFileWriter(String file)
Create a new
BackupFileWriter for the given file. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the writer.
|
private static File |
getTempFile(File file) |
flush, getEncoding, write, write, write
private File backupFile
private boolean closed
public BackupFileWriter(File file) throws IOException
BackupFileWriter
for the given file.file
- The file to write.IOException
- If the temporary file could not be opened for
writing.public BackupFileWriter(String file) throws IOException
BackupFileWriter
for the given file.file
- The path of the file to write.IOException
- 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 OutputStreamWriter
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