Package java.util.zip

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


            outputStream.write(data, 0, size);
        }
        bufferedInputStream.close();
        outputStream.closeEntry();
        outputStream.flush();
        outputStream.finish();

        return targetFile;
    }

    private List<Process> testServerJvms = new ArrayList<Process>();
View Full Code Here


      zip.putNextEntry(entry);
      mapProducer.writeTo(zip);
      zip.closeEntry();
    }

    zip.finish();
    zip.flush();
  }
}
View Full Code Here

        if (inPlaceConfUtil.isInPlaceConfiguration(dir)) {
            dir = inPlaceConfUtil.readInPlaceLocation(dir);
            writeToZip(dir, out, "", buf);
        }
        out.closeEntry();
        out.finish();
        out.flush();
    }

    private void writeToZip(File dir, ZipOutputStream out, String prefix, byte[] buf) throws IOException {
      if (dir.isDirectory()) {
View Full Code Here

            crc.reset();
            crc.update(buf);
            entry.setCrc(crc.getValue());
            s.putNextEntry(entry);
            s.write(buf, 0, buf.length);
            s.finish();
            s.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

    Tools.writeAll( out, in );

    in.close();
    out.closeEntry();
    out.finish();
    out.close();
    data.close();

    config.setData( data.toByteArray() );
  }
View Full Code Here

      ZipOutputStream out = new ZipOutputStream( tempData );
      out.putNextEntry( new ZipEntry( config.getName() ) );
      config.setSize( data.length );
      out.write( data );
      out.closeEntry();
      out.finish();
      out.close();
      config.setData( tempData.toByteArray() );
    }
    catch( Exception e )
    {
View Full Code Here

        if (storeOnly) {
            zipOut.setMethod(ZipOutputStream.STORED);
        }
        zipOut.setLevel(Deflater.BEST_COMPRESSION);
        addFiles(new File(directory), new File(directory), zipOut);
        zipOut.finish();
        zipOut.close();
    }

    private static void addFiles(File base, File file, ZipOutputStream out) throws IOException {
        if (file.isDirectory()) {
View Full Code Here

        if (inPlaceConfUtil.isInPlaceConfiguration(dir)) {
            dir = inPlaceConfUtil.readInPlaceLocation(dir);
            writeToZip(dir, out, "", buf);
        }
        out.closeEntry();
        out.finish();
        out.flush();
    }

    private void writeToZip(File dir, ZipOutputStream out, String prefix, byte[] buf) throws IOException {
        File[] all = dir.listFiles();
View Full Code Here

                read(files[i],zip);
                zip.closeEntry();
            }
        }

        zip.finish();
        zip.flush();
    }

    /**
     * Returns the mime-type of the resource in process.
View Full Code Here

        if (inPlaceConfUtil.isInPlaceConfiguration(dir)) {
            dir = inPlaceConfUtil.readInPlaceLocation(dir);
            writeToZip(dir, out, "", buf);
        }
        out.closeEntry();
        out.finish();
        out.flush();
    }

    private void writeToZip(File dir, ZipOutputStream out, String prefix, byte[] buf) throws IOException {
        File[] all = dir.listFiles();
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.