Bug 82804 Jar creation should use less memory
I noticed that the JarWriter will read the entire file it plans to store into memory. An optimization would be to stream the file directly into the JarOutputStream. The only catch is with STORED items which need the CRC32 computed. A penalty could be taken in that case to compute the CRC in a loop and then stream the file.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/jarpackager/JarPackageData.java
* @param	parent			the parent for the dialog,
	 * 							or <code>null</code> if no dialog should be presented
	 * @return the {@link IJarExportRunnable}
	 */
	public IJarExportRunnable createJarExportRunnable(JarPackageData[] jarPackagesData, Shell parent) {
		return new JarFileExportOperation(jarPackagesData, parent);
	}
	
	/**
	 * Creates and returns a JAR package data description writer
	 * for this JAR package data object.
	 * <p>
     * It is the client's responsibility to close this writer.
	 * </p>
	 * @param outputStream	the output stream to write to
	 * @return a JarWriter
	 */
	public IJarDescriptionWriter createJarDescriptionWriter(OutputStream outputStream) {
		return new JarPackageWriter(outputStream);
	}
	
	/**
	 * Creates and returns a JAR package data description reader
	 * for this JAR package data object.
	 * <p>
     * It is the client's responsibility to close this reader.
	 * </p>
	 * @param inputStream	the input stream to read from
	 * @return a JarWriter
	 */