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
if (fManifestProvider == null)
			fManifestProvider= new ManifestProvider();
		return fManifestProvider;
	}
	
	/**
	 * Sets the manifest provider.
	 * 
	 * @param manifestProvider the ManifestProvider to set
	 */
	public void setManifestProvider(IManifestProvider manifestProvider) {
		fManifestProvider= manifestProvider;
	}
	
	/**
	 * Answers whether the JAR itself is sealed.
	 * The manifest will contain a "Sealed: true" statement.
	 * <p>
	 * This option should only be considered when the
	 * manifest file is generated.
	 * </p>
	 * 
	 * @return <code>true</code> if the JAR must be sealed
	 * @see #isManifestGenerated()
	 */
	public boolean isJarSealed() {
		return fSealJar;
	}
	/**
	 * Sets whether the JAR itself is sealed.