1 package org.bukkit.util;
3 import java.nio.channels.FileChannel;
5 import java.io.FileInputStream;
6 import java.io.FileOutputStream;
7 import java.io.IOException;
23 public static boolean copy(File inFile, File outFile) {
24 if (!inFile.exists()) {
28 FileChannel in = null;
29 FileChannel out = null;
32 in =
new FileInputStream(inFile).getChannel();
33 out =
new FileOutputStream(outFile).getChannel();
36 long size = in.size();
39 pos += in.transferTo(pos, 10 * 1024 * 1024, out);
41 }
catch (IOException ioe) {
51 }
catch (IOException ioe) {