### Eclipse Workspace Patch 1.0 #P org.eclipse.update.core Index: src/org/eclipse/update/internal/core/JarDeltaInstallHandler.java =================================================================== RCS file: /home/eclipse/org.eclipse.update.core/src/org/eclipse/update/internal/core/JarDeltaInstallHandler.java,v retrieving revision 1.1 diff -u -r1.1 JarDeltaInstallHandler.java --- src/org/eclipse/update/internal/core/JarDeltaInstallHandler.java 15 Nov 2005 06:01:07 -0000 1.1 +++ src/org/eclipse/update/internal/core/JarDeltaInstallHandler.java 18 Apr 2006 19:06:24 -0000 @@ -18,7 +18,6 @@ import java.io.InputStream; import java.net.URI; import java.net.URISyntaxException; -import java.nio.channels.FileChannel; import java.util.Date; import java.util.Enumeration; import java.util.jar.JarFile; @@ -91,12 +90,22 @@ newJarFile.createNewFile(); - FileChannel in = new FileInputStream(tempFile).getChannel(); - FileChannel out = new FileOutputStream(newJarFile).getChannel(); - in.transferTo( 0, in.size(), out); - - in.close(); - out.close(); + FileInputStream in = null; + FileOutputStream out = null; + try { + in = new FileInputStream(tempFile); + out = new FileOutputStream(newJarFile); + byte[] buffer = new byte[4096]; + int len; + while ((len=in.read(buffer)) != -1) { + out.write(buffer, 0, len); + } + } finally { + if (in != null) + in.close(); + if (out != null) + out.close(); + } } public static void addToJar(JarOutputStream jos, JarFile jf) throws IOException {