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
public void setManifestLocation(IPath manifestLocation) {
		fManifestLocation= manifestLocation;
	}
	/**
	 * Gets the manifest file (as workspace resource).
	 * 
	 * @return a file which points to the manifest
	 */
	public IFile getManifestFile() {
		IPath path= getManifestLocation();
		if (path.isValidPath(path.toString()) && path.segmentCount() >= 2)
			return JavaPlugin.getWorkspace().getRoot().getFile(path);
		else
			return null;
	}
	
	/**
	 * Gets the manifest version.
	 * 
	 * @return a string containing the manifest version
	 */
	public String getManifestVersion() {
		if (fManifestVersion == null)
			return "1.0"; 
		return fManifestVersion;
	}
	
	/**
	 * Sets the manifest version.
	 *