Package org.apache.commons.compress.archivers.zip

Examples of org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.closeArchiveEntry()


                    /*
                     * Closes the archive entry, not the ZIP file.
                     */
                    @Override
                    public void close() throws IOException {
                        zip.closeArchiveEntry();
                    }
                });
            } finally {
                zip.close();
            }
View Full Code Here


    while ((curArchiveEntry = existingInputStream.getNextZipEntry()) != null) {
      existingArchiveEntryNames.add(curArchiveEntry.getName().toLowerCase());
      getLog().debug("Current File Name: " + curArchiveEntry.getName());
      tempOutputStream.putArchiveEntry(curArchiveEntry);
      IOUtils.copy(existingInputStream, tempOutputStream);
      tempOutputStream.closeArchiveEntry();
    }

    /*
     * Create content.xml within temp archive
     */
 
View Full Code Here

    while ((curArchiveEntry = existingInputStream.getNextZipEntry()) != null) {
      existingArchiveEntryNames.add(curArchiveEntry.getName().toLowerCase());
      getLog().debug("Current File Name: " + curArchiveEntry.getName());
      tempOutputStream.putArchiveEntry(curArchiveEntry);
      IOUtils.copy(existingInputStream, tempOutputStream);
      tempOutputStream.closeArchiveEntry();
    }

    /*
     * Create content.xml within temp archive
     */
 
View Full Code Here

            archive.deleteOnExit();
            zos = new ZipArchiveOutputStream(archive);
            long beforeArchiveWrite = tmp[0].lastModified();
            ZipArchiveEntry in = new ZipArchiveEntry(tmp[0], "foo");
            zos.putArchiveEntry(in);
            zos.closeArchiveEntry();
            zos.close();
            zos = null;
            zf = new ZipFile(archive);
            ZipArchiveEntry out = zf.getEntry("foo/");
            assertNotNull(out);
View Full Code Here

            zos = new ZipArchiveOutputStream(archive);
            long beforeArchiveWrite = tmp[0].lastModified();
            ZipArchiveEntry in = new ZipArchiveEntry("foo/");
            in.setTime(beforeArchiveWrite);
            zos.putArchiveEntry(in);
            zos.closeArchiveEntry();
            zos.close();
            zos = null;
            zf = new ZipFile(archive);
            ZipArchiveEntry out = zf.getEntry("foo/");
            assertNotNull(out);
View Full Code Here

            while (fis.read(b) > 0) {
                zos.write(b);
            }
            fis.close();
            fis = null;
            zos.closeArchiveEntry();
            zos.close();
            zos = null;
            zf = new ZipFile(archive);
            ZipArchiveEntry out = zf.getEntry("foo");
            assertNotNull(out);
View Full Code Here

            while (fis.read(b) > 0) {
                zos.write(b);
            }
            fis.close();
            fis = null;
            zos.closeArchiveEntry();
            zos.close();
            zos = null;
            zf = new ZipFile(archive);
            ZipArchiveEntry out = zf.getEntry("foo");
            assertNotNull(out);
View Full Code Here

          int len;
          while ((len = in.read(buf)) > 0)
          {
            out.write(buf, 0, len);
          }
          out.closeArchiveEntry();
        }
        finally
        {
          if (in != null)
          {
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.