|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hsqldb.lib.tar.DbBackup
public class DbBackup
Works with tar archives containing HSQLDB database instance backups. Viz, creating, examining, or extracting these archives.
This class provides OO Tar backup-creation control. The extraction and listing features are implemented only in static fashion in the Main method, which provides a consistent interface for all three features from the command-line.
For tar creation, the default behavior is to fail if the target archive exists, and to abort if any database change is detected. Use the JavaBean setters to changes this behavior. See the main(String[]) method for details about command-line usage.
DbBackupMain.main(String[])
,
setOverWrite(boolean)
,
setAbortUponModify(boolean)
Constructor Summary | |
---|---|
DbBackup(File archiveFile,
String dbPath)
Instantiate a DbBackup instance for creating a Database Instance backup. |
|
DbBackup(File archiveFile,
String dbPath,
boolean script)
Used for SCRIPT backup |
Method Summary | |
---|---|
boolean |
getAbortUponModify()
|
boolean |
getOverWrite()
|
void |
setAbortUponModify(boolean abortUponModify)
Defaults to true. |
void |
setFileIgnore(String fileExtension)
|
void |
setOverWrite(boolean overWrite)
Defaults to false. |
void |
setStream(String fileExtension,
org.hsqldb.lib.InputStreamInterface is)
Overrides file with stream. |
void |
write()
This method always backs up the .properties and .script files. |
void |
writeAsFiles()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DbBackup(File archiveFile, String dbPath)
public DbBackup(File archiveFile, String dbPath, boolean script)
Method Detail |
---|
public void setStream(String fileExtension, org.hsqldb.lib.InputStreamInterface is)
public void setFileIgnore(String fileExtension)
public void setOverWrite(boolean overWrite)
public void setAbortUponModify(boolean abortUponModify)
public boolean getOverWrite()
public boolean getAbortUponModify()
public void write() throws IOException, org.hsqldb.lib.tar.TarMalformatException
IOException
- for any of many possible I/O problems
IllegalStateException
- only if abortUponModify is set, and
database is open or is modified.
org.hsqldb.lib.tar.TarMalformatException
public void writeAsFiles() throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |