--- old/src/java.base/share/classes/jdk/internal/jrtfs/JrtPath.java 2017-12-22 15:05:51.000000000 -0800 +++ new/src/java.base/share/classes/jdk/internal/jrtfs/JrtPath.java 2017-12-22 15:05:50.000000000 -0800 @@ -45,6 +45,7 @@ import java.util.Set; import static java.nio.file.StandardOpenOption.*; import static java.nio.file.StandardCopyOption.*; +import jdk.internal.io.IOSupport; /** * Base class for Path implementation of jrt file systems. @@ -793,11 +794,7 @@ } else { try (InputStream is = jrtfs.newInputStream(this); OutputStream os = target.newOutputStream()) { - byte[] buf = new byte[8192]; - int n; - while ((n = is.read(buf)) != -1) { - os.write(buf, 0, n); - } + IOSupport.copy(is, os); } } if (copyAttrs) {