|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.osmosis.core.util.AtomicFileCreator
public class AtomicFileCreator
Supports the creation of files in an atomic fashion. Internally it creates files using a temporary filename, then renames them to the final file name.
Constructor Summary | |
---|---|
AtomicFileCreator(java.io.File file)
Creates a new instance. |
Method Summary | |
---|---|
boolean |
exists()
Checks if either one of the main or temporary files currently exists. |
java.io.File |
getFile()
Returns the file represented by this class. |
java.io.File |
getTmpFile()
Returns the temporary file used during file generation. |
void |
renameTmpFileToCurrent()
Renames the new temporary file to the current file deleting the current file if it exists. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AtomicFileCreator(java.io.File file)
file
- The file to be created.Method Detail |
---|
public boolean exists()
public void renameTmpFileToCurrent()
public java.io.File getTmpFile()
public java.io.File getFile()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |