当前位置: 首页>>代码示例>>Java>>正文


Java FileAccess.FileSync方法代码示例

本文整理汇总了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;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:23,代码来源:HsqlProperties.java

示例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;
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:18,代码来源:ScriptWriterBase.java

示例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;
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:22,代码来源:HsqlProperties.java

示例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;
    }
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:22,代码来源:HsqlProperties.java

示例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;
    }
 
开发者ID:RabadanLab,项目名称:Pegasus,代码行数:25,代码来源:HsqlProperties.java

示例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
        });
    }
}
 
开发者ID:RabadanLab,项目名称:Pegasus,代码行数:18,代码来源:ScriptWriterEncode.java

示例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;
}
 
开发者ID:RabadanLab,项目名称:Pegasus,代码行数:17,代码来源:ScriptWriterBase.java

示例8: ScriptWriterText

import org.hsqldb.lib.FileAccess; //导入方法依赖的package包/类
public ScriptWriterText(Database db, OutputStream outputStream,
                        FileAccess.FileSync descriptor,
                        boolean includeCachedData) {
    super(db, outputStream, descriptor, includeCachedData);
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:6,代码来源:ScriptWriterText.java


注:本文中的org.hsqldb.lib.FileAccess.FileSync方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。