Package krati.io

Examples of krati.io.FastDataWriter


     * @throws IOException
     */
    public final void save(File file) throws IOException {
        _entryFile = file;
        Chronos c = new Chronos();
        DataWriter out = new FastDataWriter(file);

        try {
            out.open();

            // Save entry head
            out.writeLong(STORAGE_VERSION); // write the entry file version
            out.writeLong(_minScn);
            out.writeLong(_maxScn);
            out.writeInt(size());

            // Save entry body
            saveDataSection(out);

            // Save entry tail.
            out.writeLong(_minScn);
            out.writeLong(_maxScn);
        } finally {
            out.close();
        }
       
        if(_log.isInfoEnabled()) {
            _log.info("Saved entry: minScn=" + _minScn + " maxScn=" + _maxScn + " size=" + size() + " file=" + file.getName() + " in " + c.getElapsedTime());
        }
View Full Code Here

TOP

Related Classes of krati.io.FastDataWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.