public class StoreFileMover
extends java.lang.Object
Constructor and Description |
---|
StoreFileMover()
Calculate file objects for the old and new configuration files.
|
StoreFileMover(java.lang.String basename,
java.lang.String filename,
java.lang.String encoding)
Calculate file objects for the old and new configuration files.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBasename() |
java.io.File |
getConfigNew() |
java.io.File |
getConfigOld() |
java.io.File |
getConfigSave() |
java.lang.String |
getEncoding() |
java.lang.String |
getFilename() |
protected java.lang.String |
getTimeTag()
Time value for backup yyyy-mm-dd.hh-mm-ss
|
java.io.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(java.lang.String basename) |
void |
setEncoding(java.lang.String string) |
void |
setFilename(java.lang.String string) |
public StoreFileMover(java.lang.String basename, java.lang.String filename, java.lang.String encoding)
public StoreFileMover()
public java.io.File getConfigNew()
public java.io.File getConfigOld()
public java.io.File getConfigSave()
public java.lang.String getBasename()
public void setBasename(java.lang.String basename)
basename
- The basename to set.public java.lang.String getFilename()
public void setFilename(java.lang.String string)
string
- public java.lang.String getEncoding()
public void setEncoding(java.lang.String string)
string
- public void init()
public void move() throws java.io.IOException
java.io.IOException
public java.io.PrintWriter getWriter() throws java.io.IOException
java.io.IOException
protected java.lang.String getTimeTag()
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.