backup = new DbBackup(archiveFile, dbPath);
backup.setAbortUponModify(false);
if (!blocking) {
InputStreamWrapper isw;
File file = null;
if (hasCache()) {
DataFileCache dataFileCache = getCache();
RAShadowFile shadowFile =
dataFileCache.getShadowFile();
if (shadowFile == null) {
backup.setFileIgnore(dataFileExtension);
} else {
file = new File(dataFileCache.dataFileName);
isw = new InputStreamWrapper(
new FileInputStream(file));
isw.setSizeLimit(
dataFileCache.fileStartFreePosition);
backup.setStream(dataFileExtension, isw);
InputStreamInterface isi =
shadowFile.getInputStream();
backup.setStream(backupFileExtension, isi);
}
}
// log
file = new File(log.getLogFileName());
long fileLength = file.length();
if (fileLength == 0) {
backup.setFileIgnore(logFileExtension);
} else {
isw = new InputStreamWrapper(
new FileInputStream(file));
isw.setSizeLimit(fileLength);
backup.setStream(logFileExtension, isw);
}
}
if (asFiles) {