public class StoreFileMover extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static StringManager |
sm |
| Constructor and Description |
|---|
StoreFileMover()
Calculate file objects for the old and new configuration files.
|
StoreFileMover(String basename,
String filename,
String encoding)
Calculate file objects for the old and new configuration files.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getBasename() |
File |
getConfigNew() |
File |
getConfigOld() |
File |
getConfigSave() |
String |
getEncoding() |
String |
getFilename() |
protected String |
getTimeTag()
Time value for backup yyyy-mm-dd.hh-mm-ss.
|
PrintWriter |
getWriter()
Open an output writer for the new configuration file.
|
void |
init()
Generate the Filename to new with TimeStamp.
|
void |
move()
Shuffle old->save and new->old.
|
void |
setBasename(String basename) |
void |
setEncoding(String string) |
void |
setFilename(String string) |
protected static final StringManager sm
public StoreFileMover(String basename, String filename, String encoding)
basename - The base pathencoding - The encoding of the filefilename - The file namepublic StoreFileMover()
public File getConfigNew()
public File getConfigOld()
public File getConfigSave()
public String getBasename()
public void setBasename(String basename)
basename - The basename to set.public String getFilename()
public void setFilename(String string)
string - The file namepublic String getEncoding()
public void setEncoding(String string)
string - The encodingpublic void init()
public void move()
throws IOException
IOException - a file operation error occurredpublic PrintWriter getWriter() throws IOException
IOException - Failed opening a writer to the new fileprotected String getTimeTag()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.