Example #1
0
 private static void CopyEntries(java.util.zip.ZipFile source, ZipOutputStream destination, string[] entryNames)
 {
     List<ZipEntry> zippedItems = GetZippedItems(source);
     for (int i = 0; i < entryNames.Length; i++)
     {
         foreach (ZipEntry entry in zippedItems)
         {
             if (entry.getName() == entryNames[i])
             {
                 destination.putNextEntry(entry);
                 InputStream stream = source.getInputStream(entry);
                 CopyStream(stream, destination);
                 destination.closeEntry();
                 stream.close();
             }
         }
     }
 }
Example #2
0
 private static void CopyEntries(java.util.zip.ZipFile source, ZipOutputStream destination)
 {
     foreach (ZipEntry entry in GetZippedItems(source))
     {
         destination.putNextEntry(entry);
         InputStream stream = source.getInputStream(entry);
         CopyStream(stream, destination);
         destination.closeEntry();
         stream.close();
     }
 }