use of org.hsqldb_voltpatches.lib.FileAccess in project voltdb by VoltDB.
the class ScriptWriterBase method openFile.
/**
* File is opened in append mode although in current usage the file
* never pre-exists
*/
protected void openFile() {
try {
FileAccess fa = isDump ? FileUtil.getDefaultInstance() : database.getFileAccess();
OutputStream fos = fa.openOutputStreamElement(outFile);
outDescriptor = fa.getFileSync(fos);
fileStreamOut = new BufferedOutputStream(fos, 2 << 12);
} catch (IOException e) {
throw Error.error(ErrorCode.FILE_IO_ERROR, ErrorCode.M_Message_Pair, new Object[] { e.toString(), outFile });
}
}
use of org.hsqldb_voltpatches.lib.FileAccess in project voltdb by VoltDB.
the class ScriptWriterZipped method openFile.
protected void openFile() {
try {
FileAccess fa = database.getFileAccess();
java.io.OutputStream fos = fa.openOutputStreamElement(outFile);
outDescriptor = fa.getFileSync(fos);
fileStreamOut = new DeflaterOutputStream(fos, new Deflater(Deflater.DEFAULT_COMPRESSION), bufferSize);
} catch (IOException e) {
throw Error.error(ErrorCode.FILE_IO_ERROR, ErrorCode.M_Message_Pair, new Object[] { e.toString(), outFile });
}
}
Aggregations