Package java.util.zip

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


        for (ZipEntry ze = zin.getNextEntry(); ze != null; ze = zin.getNextEntry()) {
            out.putNextEntry(ze);
            for (int read = zin.read(buffer); read > -1; read = zin.read(buffer)) {
                out.write(buffer, 0, read);
            }
            out.closeEntry();
        }
        zin.close();
        out.close();
        tmpZip.delete();
    }
View Full Code Here


        ZipInputStream zin = new ZipInputStream(new FileInputStream(tmpZip));
        ZipOutputStream out = new ZipOutputStream(new FileOutputStream(source));
       
        out.putNextEntry(new ZipEntry(entryName));
        out.write(buffer, 0, length);
        out.closeEntry();

        for (ZipEntry ze = zin.getNextEntry(); ze != null; ze = zin.getNextEntry()) {
            out.putNextEntry(ze);
            for (int read = zin.read(buffer); read > -1; read = zin.read(buffer)) {
                out.write(buffer, 0, read);
View Full Code Here

        for (ZipEntry ze = zin.getNextEntry(); ze != null; ze = zin.getNextEntry()) {
            out.putNextEntry(ze);
            for (int read = zin.read(buffer); read > -1; read = zin.read(buffer)) {
                out.write(buffer, 0, read);
            }
            out.closeEntry();
        }
        zin.close();
        out.close();
        tmpZip.delete();
    }
View Full Code Here

            reportExecutionMessage.append(exceptionWriter.toString());

            throw new JobExecutionException(e, true);
        } finally {
            try {
                zos.closeEntry();
                zos.close();
                baos.close();
            } catch (IOException e) {
                LOG.error("While closing StreamResult's backend", e);
            }
View Full Code Here

                  outEntry.setCrc( crc.getValue() );
                  outEntry.setCompressedSize( byteCode.length );
                }
                out.putNextEntry( outEntry );
                out.write( byteCode );
                out.closeEntry();
          }
        };
        ZipFileProcessor processor = new ZipFileProcessor( transformer );
        processor.process( file );
        out.close();
View Full Code Here

                  outEntry.setCrc( crc.getValue() );
                  outEntry.setCompressedSize( byteCode.length );
                }
                out.putNextEntry( outEntry );
                out.write( byteCode );
                out.closeEntry();
          }
        };
        ZipFileProcessor processor = new ZipFileProcessor( transformer );
        processor.process( file );
        out.close();
View Full Code Here

              outEntry.setCrc( crc.getValue() );
              outEntry.setCompressedSize( byteCode.length );
            }
            out.putNextEntry( outEntry );
            out.write( byteCode );
            out.closeEntry();
          }
        };

        final ZipFileProcessor processor = new ZipFileProcessor( transformer );
        processor.process( file );
View Full Code Here

                zipOutputStream.putNextEntry(new ZipEntry(adjustJarFileName(fileName)));
                int len;
                while ((len = in.read(buffer)) > 0) {
                    zipOutputStream.write(buffer, 0, len);
                }
                zipOutputStream.closeEntry();
                in.close();
            }
        }
        zipOutputStream.close();
        sourceTempFile.delete();
View Full Code Here

            int len;
            while ((len = is.read(InputData)) != EOF)
            {
               zos.write(InputData, 0, len);
            }
            zos.closeEntry();
         }
         else if (di instanceof FileDataInstance)
         {
            di.getZipOut(true, zos);
         }
View Full Code Here

            byte InputData[] = new byte[BUFFER];
            while ((len = is.read(InputData)) != EOF)
            {
               zos.write(InputData, 0, len);
            }
            zos.closeEntry();
         }
         else if (di instanceof FileDataInstance)
         {
            di.setType("Zip");
            InputStream is = di.getInputStream();
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.