本文整理汇总了Java中org.hsqldb.lib.FileAccess.FileSync方法的典型用法代码示例。如果您正苦于以下问题:Java FileAccess.FileSync方法的具体用法?Java FileAccess.FileSync怎么用?Java FileAccess.FileSync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hsqldb.lib.FileAccess
的用法示例。
在下文中一共展示了FileAccess.FileSync方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: save
import org.hsqldb.lib.FileAccess; //导入方法依赖的package包/类
/**
* Saves the properties using JDK2 method if present, otherwise JDK1.
*/
public void save(String fileString) throws Exception {
// [email protected]
fa.createParentDirs(fileString);
fa.removeElement(fileString);
OutputStream fos = fa.openOutputStreamElement(fileString);
FileAccess.FileSync outDescriptor = fa.getFileSync(fos);
String name = HsqlDatabaseProperties.PRODUCT_NAME + " "
+ HsqlDatabaseProperties.THIS_FULL_VERSION;
stringProps.store(fos, name);
fos.flush();
outDescriptor.sync();
fos.close();
outDescriptor = null;
fos = null;
}
示例2: ScriptWriterBase
import org.hsqldb.lib.FileAccess; //导入方法依赖的package包/类
ScriptWriterBase(Database db, OutputStream outputStream,
FileAccess.FileSync descriptor,
boolean includeCachedData) {
initBuffers();
this.database = db;
this.includeCachedData = includeCachedData;
this.includeIndexRoots = !includeCachedData;
currentSession = database.sessionManager.getSysSession();
// start with neutral schema - no SET SCHEMA to log
schemaToLog = currentSession.loggedSchema =
currentSession.currentSchema;
fileStreamOut = new BufferedOutputStream(outputStream, 1 << 14);
outDescriptor = descriptor;
}
示例3: save
import org.hsqldb.lib.FileAccess; //导入方法依赖的package包/类
/**
* Saves the properties using JDK2 method if present, otherwise JDK1.
*/
public void save(String fileString) throws Exception {
// [email protected]
fa.createParentDirs(fileString);
OutputStream fos = fa.openOutputStreamElement(fileString);
FileAccess.FileSync outDescriptor = fa.getFileSync(fos);
JavaSystem.saveProperties(
stringProps,
HsqlDatabaseProperties.PRODUCT_NAME + " "
+ HsqlDatabaseProperties.THIS_FULL_VERSION, fos);
fos.flush();
outDescriptor.sync();
fos.close();
return;
}
示例4: save
import org.hsqldb.lib.FileAccess; //导入方法依赖的package包/类
/**
* Saves the properties using JDK2 method if present, otherwise JDK1.
*/
public void save(String fileString) throws Exception {
// [email protected]
fa.createParentDirs(fileString);
OutputStream fos = fa.openOutputStreamElement(fileString);
FileAccess.FileSync outDescriptor = fa.getFileSync(fos);
String name = HsqlDatabaseProperties.PRODUCT_NAME + " "
+ HsqlDatabaseProperties.THIS_FULL_VERSION;
stringProps.store(fos, name);
fos.flush();
outDescriptor.sync();
fos.close();
outDescriptor = null;
fos = null;
}
示例5: save
import org.hsqldb.lib.FileAccess; //导入方法依赖的package包/类
/**
* Saves the properties using JDK2 method if present, otherwise JDK1.
*/
public void save(String fileString) throws Exception {
// [email protected]
fa.createParentDirs(fileString);
OutputStream fos = fa.openOutputStreamElement(fileString);
FileAccess.FileSync outDescriptor = fa.getFileSync(fos);
JavaSystem.saveProperties(
stringProps,
HsqlDatabaseProperties.PRODUCT_NAME + " "
+ HsqlDatabaseProperties.THIS_FULL_VERSION, fos);
fos.flush();
outDescriptor.sync();
fos.close();
outDescriptor = null;
fos = null;
return;
}
示例6: ScriptWriterEncode
import org.hsqldb.lib.FileAccess; //导入方法依赖的package包/类
public ScriptWriterEncode(Database db, OutputStream outputStream,
FileAccess.FileSync descriptor,
boolean includeCached, Crypto crypto) {
super(db, outputStream, descriptor, includeCached);
try {
cryptOut = crypto.getOutputStream(fileStreamOut);
fileStreamOut = new GZIPOutputStream(cryptOut);
isCrypt = true;
} catch (IOException e) {
throw Error.error(e, ErrorCode.FILE_IO_ERROR,
ErrorCode.M_Message_Pair, new Object[] {
e.toString(), outFile
});
}
}
示例7: ScriptWriterBase
import org.hsqldb.lib.FileAccess; //导入方法依赖的package包/类
ScriptWriterBase(Database db, OutputStream outputStream,
FileAccess.FileSync descriptor,
boolean includeCachedData) {
initBuffers();
this.database = db;
this.includeCachedData = includeCachedData;
currentSession = database.sessionManager.getSysSession();
// start with neutral schema - no SET SCHEMA to log
schemaToLog = currentSession.loggedSchema =
currentSession.currentSchema;
fileStreamOut = new BufferedOutputStream(outputStream, 1 << 14);
outDescriptor = descriptor;
}
示例8: ScriptWriterText
import org.hsqldb.lib.FileAccess; //导入方法依赖的package包/类
public ScriptWriterText(Database db, OutputStream outputStream,
FileAccess.FileSync descriptor,
boolean includeCachedData) {
super(db, outputStream, descriptor, includeCachedData);
}