Bug 75206 [Import/Export] Export large file using Export filesystem wizard causes OutOfMemory
I have a project which creates a large output file (a filesystem image). Eclipse reports the size as 409600000 bytes. If I try to export this file using the Export->File System wizard, I quickly get an out of memory error. I set the max heap size to 256M (-Xmx256M).
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/FileSystemExporter.java
if (resource.getType() == IResource.FILE) {
			writeFile((IFile) resource, destinationPath);
		} else {
			writeChildren((IContainer) resource, destinationPath);
		}
    }
    /**
     *  Exports the passed container's children
     */
    protected void writeChildren(IContainer folder, IPath destinationPath)
            throws CoreException, IOException {
        if (folder.isAccessible()) {
            IResource[] children = folder.members();
            for (int i = 0; i < children.length; i++) {
                IResource child = children[i];
                writeResource(child, destinationPath.append(child.getName()));
            }
        }
    }
    /**
     *  Writes the passed file resource to the specified destination on the local
     *  file system
     */
    protected void writeFile(IFile file, IPath destinationPath)
            throws IOException, CoreException {
        FileOutputStream output = null;
        InputStream contentStream = null;
        try {
            contentStream = file.getContents(false);
            output = new FileOutputStream(destinationPath.toOSString());