Package java.util.zip

Examples of java.util.zip.ZipOutputStream.finish()


          }
        }       
        // Write Content objects in files
        writeContents(zipOut, offlineFurnitureLibrary, furnitureResourcesLocalDirectory, contentEntries);
        // Finish zip writing
        zipOut.finish();
        zipOut.close();
        zipOut = null;

        copyFile(tmpFile, furnitureLibraryFile);
        tmpFile.delete();
View Full Code Here


        new File(file.getAbsolutePath() + "_TMP").delete();
        throw exc;
      } finally {
        newZip.flush();
        newZip.closeEntry();
        newZip.finish();
        newZip.close();
      }
      String toRename = file.getAbsolutePath() + "_TMP";
      new File(file.getAbsolutePath()).delete();
      new File(toRename).renameTo(file);
View Full Code Here

            res = false;
        }

        try {
            if (zos != null){
                zos.finish();
                zos.close();
            }
        } catch (IOException e) {
            //TODO display message
            res = false;
View Full Code Here

      zipos.putNextEntry(zipEntry);
      exportZipEntry.writeData(zipos);
    }
   
    zipos.flush();
    zipos.finish();
  }
 
  /**
   *
   */
 
View Full Code Here

      ZipEntry jrctxEntry = new ZipEntry(themeName + ".jrctx");
      zipos.putNextEntry(jrctxEntry);
      XmlChartTheme.saveSettings(settings, new OutputStreamWriter(zipos));

      zipos.flush();
      zipos.finish();
    }
    finally
    {
      if (fos != null)
      {
View Full Code Here

      } else {
        writeZipEntry(zipOut, entryNameOrDirectory, content);
      }
    } 
    // Finish zip writing
    zipOut.finish();
  }

  /**
   * Writes in <code>zipOut</code> stream one or more entries matching the content
   * <code>urlContent</code> coming from a resource file.
View Full Code Here

            gephiWriter.writeAll(project, writer);
            writer.close();

            //Close
            zipOut.closeEntry();
            zipOut.finish();
            bufferedOutputStream.close();



            //Clean and copy
View Full Code Here

        try {
            FileOutputStream file = newFile(jar_path);
            try {
                ZipOutputStream zip = new ZipOutputStream(file);
                addEntries(context, zip, hash);
                zip.finish();
            } finally {
                close(file);
            }
        } catch (IOException e) {
            if (runtime.isDebug()) {
View Full Code Here

            }
            fos = new FileOutputStream(target);
            cpZipOutputStream = new ZipOutputStream(fos);
            cpZipOutputStream.setLevel(9);
            zipFiles(cpFile, sourcePath, cpZipOutputStream);
            cpZipOutputStream.finish();
        }
        catch (Exception e)
        {
            logger.error("Unexpected exception during writing to zip output stream.", e);
            return false;
View Full Code Here

      ze.setSize(data.length);
      tos.putNextEntry(ze);
      tos.write(data);
      tos.closeEntry();
      tos.flush();
      tos.finish();
    } finally {
      tos.close();
    }
   
    // successfully untar it into an existing dir:
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.