/** * Creates a zip file and adds the list of source file(s) to the zip file. If the zip file * exists then this method throws an exception. Parameters such as compression type, etc * can be set in the input parameters * @param sourceFileList - File to be added to the zip file * @param parameters - parameters to create the zip file * @throws ZipException */ public void createZipFile(ArrayList sourceFileList, ZipParameters parameters) throws ZipException { createZipFile(sourceFileList, parameters, false, -1); }
/** * Creates a zip file and adds the list of source file(s) to the zip file. If the zip file * exists then this method throws an exception. Parameters such as compression type, etc * can be set in the input parameters * @param sourceFileList - File to be added to the zip file * @param parameters - parameters to create the zip file * @throws ZipException */ public void createZipFile(ArrayList sourceFileList, ZipParameters parameters) throws ZipException { createZipFile(sourceFileList, parameters, false, -1); }
/** * Creates a zip file and adds the source file to the zip file. If the zip file * exists then this method throws an exception. Parameters such as compression type, etc * can be set in the input parameters * @param sourceFile - File to be added to the zip file * @param parameters - parameters to create the zip file * @throws ZipException */ public void createZipFile(File sourceFile, ZipParameters parameters) throws ZipException { ArrayList sourceFileList = new ArrayList(); sourceFileList.add(sourceFile); createZipFile(sourceFileList, parameters, false, -1); }
/** * Creates a zip file and adds the source file to the zip file. If the zip file * exists then this method throws an exception. Parameters such as compression type, etc * can be set in the input parameters * @param sourceFile - File to be added to the zip file * @param parameters - parameters to create the zip file * @throws ZipException */ public void createZipFile(File sourceFile, ZipParameters parameters) throws ZipException { ArrayList sourceFileList = new ArrayList(); sourceFileList.add(sourceFile); createZipFile(sourceFileList, parameters, false, -1); }
/** * Creates a zip file and adds the source file to the zip file. If the zip file * exists then this method throws an exception. Parameters such as compression type, etc * can be set in the input parameters. While the method addFile/addFiles also creates the * zip file if it does not exist, the main functionality of this method is to create a split * zip file. To create a split zip file, set the splitArchive parameter to true with a valid * splitLength. Split Length has to be more than 65536 bytes * @param sourceFile - File to be added to the zip file * @param parameters - parameters to create the zip file * @param splitArchive - if archive has to be split or not * @param splitLength - if archive has to be split, then length in bytes at which it has to be split * @throws ZipException */ public void createZipFile(File sourceFile, ZipParameters parameters, boolean splitArchive, long splitLength) throws ZipException { ArrayList sourceFileList = new ArrayList(); sourceFileList.add(sourceFile); createZipFile(sourceFileList, parameters, splitArchive, splitLength); }
/** * Creates a zip file and adds the source file to the zip file. If the zip file * exists then this method throws an exception. Parameters such as compression type, etc * can be set in the input parameters. While the method addFile/addFiles also creates the * zip file if it does not exist, the main functionality of this method is to create a split * zip file. To create a split zip file, set the splitArchive parameter to true with a valid * splitLength. Split Length has to be more than 65536 bytes * @param sourceFile - File to be added to the zip file * @param parameters - parameters to create the zip file * @param splitArchive - if archive has to be split or not * @param splitLength - if archive has to be split, then length in bytes at which it has to be split * @throws ZipException */ public void createZipFile(File sourceFile, ZipParameters parameters, boolean splitArchive, long splitLength) throws ZipException { ArrayList sourceFileList = new ArrayList(); sourceFileList.add(sourceFile); createZipFile(sourceFileList, parameters, splitArchive, splitLength); }