Package de.schlichtherle.truezip.zip

Examples of de.schlichtherle.truezip.zip.ZipOutputStream


          saveFile.getParentFile());
      tempFile.deleteOnExit();

      // Create a ZIP stream writing to the temporary file
      FileOutputStream tempStream = new FileOutputStream(tempFile);
      ZipOutputStream zipStream = new ZipOutputStream(tempStream);

      // Stage 1 - save version and configuration
      currentStage++;
      saveVersion(zipStream);
      saveConfiguration(zipStream);
      if (isCanceled()) {
        zipStream.close();
        tempFile.delete();
        return;
      }

      // Stage 2 - save RawDataFile objects
      currentStage++;
      saveRawDataFiles(zipStream);
      if (isCanceled()) {
        zipStream.close();
        tempFile.delete();
        return;
      }

      // Stage 3 - save PeakList objects
      currentStage++;
      savePeakLists(zipStream);
      if (isCanceled()) {
        zipStream.close();
        tempFile.delete();
        return;
      }

      // Stage 4 - save user parameters
      currentStage++;
      saveUserParameters(zipStream);
      if (isCanceled()) {
        zipStream.close();
        tempFile.delete();
        return;
      }

      // Stage 5 - finish and close the temporary ZIP file
      currentStage++;
      currentSavedObjectName = null;
      zipStream.close();

      // Final check for cancel
      if (isCanceled()) {
        tempFile.delete();
        return;
View Full Code Here


      // write the saving file
      FileOutputStream fos = new FileOutputStream(fileName);
      OutputStream finalStream = fos;

      if (compression) {
        ZipOutputStream zos = new ZipOutputStream(fos);
        zos.setLevel(9);
        zos.putNextEntry(new ZipEntry(fileName.getName()));
        finalStream = zos;
      }

      Hashtable<RawDataFile, String> dataFilesIDMap = new Hashtable<RawDataFile, String>();
      for (RawDataFile file : peakList.getRawDataFiles()) {
View Full Code Here

TOP

Related Classes of de.schlichtherle.truezip.zip.ZipOutputStream

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.