Package org.hsqldb.lib

Examples of org.hsqldb.lib.InputStreamWrapper


                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) {
View Full Code Here


            }

            modTime     = file.lastModified() / 1000L;
            fileMode    = TarEntrySupplicant.getLameMode(file);
            dataSize    = file.length();
            inputStream = new InputStreamWrapper(new FileInputStream(file));
        }
View Full Code Here

             *  This constructor not available until Java 1.6:
             * inputStream = new PipedInputStream(outPipe, maxBytes);
             */
            try {
                inputStream =
                    new InputStreamWrapper(new PipedInputStream(outPipe));

                while ((i =
                        origStream.read(tarStream.writeBuffer, 0,
                                        tarStream.writeBuffer.length)) > 0) {
                    outPipe.write(tarStream.writeBuffer, 0, i);
View Full Code Here

            File outFile = new File(archiveFile, componentFiles[i].getName());
            fileOut = new FileOutputStream(outFile);

            if (componentStreams[i] == null) {
                componentStreams[i] = new InputStreamWrapper(
                    new FileInputStream(componentFiles[i]));
            }

            InputStreamInterface instream = componentStreams[i];
View Full Code Here

                backup = new DbBackup(archiveFile, dbPath);

                backup.setAbortUponModify(false);

                if (!blocking) {
                    InputStreamWrapper isw;
                    File               file = null;

                    if (hasCache()) {
                        DataFileCache dataFileCache = getCache();

                        file = new File(dataFileCache.dataFileName);
                        isw = new InputStreamWrapper(
                            new FileInputStream(file));

                        isw.setSizeLimit(dataFileCache.fileStartFreePosition);
                        backup.setStream(dataFileExtension, isw);

                        RAShadowFile shadowFile =
                            dataFileCache.getShadowFile();

                        if (shadowFile != null) {
                            InputStreamInterface isi =
                                shadowFile.getInputStream();

                            backup.setStream(backupFileExtension, isi);
                        }
                    }

                    // log
                    file = new File(log.getLogFileName());
                    isw  = new InputStreamWrapper(new FileInputStream(file));

                    isw.setSizeLimit(file.length());
                    backup.setStream(logFileExtension, isw);
                }

                backup.write();
            }
View Full Code Here

            }

            modTime     = file.lastModified() / 1000L;
            fileMode    = TarEntrySupplicant.getLameMode(file);
            dataSize    = file.length();
            inputStream = new InputStreamWrapper(new FileInputStream(file));
        }
View Full Code Here

            /* This constructor not available until Java 1.6:
            inputStream = new PipedInputStream(outPipe, maxBytes);
            */
            try {
                inputStream = new InputStreamWrapper(new PipedInputStream(outPipe));
                while ((i =
                        origStream
                            .read(tarStream.writeBuffer, 0, tarStream
                                .writeBuffer.length)) > 0) {
                    outPipe.write(tarStream.writeBuffer, 0, i);
View Full Code Here

TOP

Related Classes of org.hsqldb.lib.InputStreamWrapper

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.