Package java.util.zip

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


        ZipOutputStream zout = new ZipOutputStream( bout );

        zout.putNextEntry( new ZipEntry( "repository_export.xml" ) );
        zout.write( dumpPackageFromRepositoryXml( packageName ) );
        zout.closeEntry();
        zout.finish();
        return bout.toByteArray();
    }

    public byte[] dumpPackageFromRepositoryXml(String packageName) throws PathNotFoundException,
                                                                  IOException,
View Full Code Here


                           || name.endsWith(".prj") || name.endsWith(".cst");
                }
            };
            ZipOutputStream zipOut = new ZipOutputStream(output);
            IOUtils.zipDirectory(tempDir, zipOut, filter);
            zipOut.finish();

            // This is an error, because this closes the output stream too... it's
            // not the right place to do so
            // zipOut.close();
        } finally {
View Full Code Here

        int c;
        while ((c = in.read()) != -1)
            out.write(c);
        in.close();
        out.closeEntry();
        out.finish();
        out.close();
    }


View Full Code Here

        zipOut.putNextEntry(new ZipEntry("message.xml"));
        zipOut.write(getXmlData().getBytes("UTF-8"));
        zipOut.closeEntry();

        zipOut.finish();
        zipOut.close();
    }

    private String getXmlData() throws IOException {
        String result;
View Full Code Here

        }
        zipIn.close();
       
        // now, ask the external resource manager to augment the ZIP.
        extMgr.addExternalResourcesToBackup(zipOut);
        zipOut.finish();
        zipOut.close();
       
        return result;
    }
   
View Full Code Here

                filterZipEntry(srcEntry, data.getFile(srcEntry), "", out);
            }
        }

        // clean up
        out.finish();
        srcZip.close();
    }

    private void filterPdashFile(ZipEntry srcEntry, String filename,
            ZipOutputStream out) throws IOException {
View Full Code Here

                filenamePrefix, pdashOut);
        }

        // clean up the streams
        pdashIn.close();
        pdashOut.finish();
    }

    private void copyUnfilteredEntry(ZipEntry srcEntry, ZipOutputStream zipOut)
            throws IOException {
        // create a new entry in the dest ZIP
View Full Code Here

      
       zipOut.putNextEntry(new ZipEntry("ref.zip"));
      
       ZipOutputStream refZip = new ZipOutputStream(zipOut);
       storeLangInZip(saveRefLang, p, refZip);
       refZip.finish();
      
       zipOut.closeEntry();
   }
  
   private void storeTagInZip(String zipFileName, ZipOutputStream zipOut) throws IOException {
View Full Code Here

                resourceContent.close();
            }
            zipOut.closeEntry();
        }

        zipOut.finish();
    }

}
View Full Code Here

                e.setTime(f.lastModified());
                zipOut.putNextEntry(e);
                FileUtils.copyFile(f, zipOut);
                zipOut.closeEntry();
            }
            zipOut.finish();
            zipOut.flush();
        } catch (IOException ioe) {
            rOut.abort();
            throw ioe;
        }
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.