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/internal/ui/jarpackager/JarFileExportOperation.java
* 
	 * @return true if user pressed OK and save was successful.
	 */
	private boolean saveModifiedResourcesIfUserConfirms(IFile[] dirtyFiles) {
		if (confirmSaveModifiedResources(dirtyFiles))
			return saveModifiedResources(dirtyFiles);
		
		for (int i= 0; i < dirtyFiles.length; i++)
			addError(JarPackagerMessages.getFormattedString("JarFileExportOperation.fileUnsaved", dirtyFiles[i].getFullPath()), null); 
		return false;
	}
	/**
	 * Save all of the editors in the workbench.  
	 * 
	 * @return true if successful.
	 */
	private boolean saveModifiedResources(final IFile[] dirtyFiles) {
		
		Display display= fParentShell.getDisplay();
		if (display == null || display.isDisposed())
			return false;
		
		final boolean[] retVal= new boolean[1];
		Runnable runnable= new Runnable() {
			public void run() {
				try {
					PlatformUI.getWorkbench().getProgressService().runInUI(
						PlatformUI.getWorkbench().getProgressService(),
						createSaveModifiedResourcesRunnable(dirtyFiles),
						ResourcesPlugin.getWorkspace().getRoot());