Skip to content

Commit

Permalink
Fix for #82
Browse files Browse the repository at this point in the history
  • Loading branch information
berry120 committed Jan 4, 2019
1 parent 8b87dd8 commit bf3c45d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.util.logging.Level;
Expand Down Expand Up @@ -140,7 +141,7 @@ private static void copyFile(String in, String out) throws Exception {

ByteBuffer buff = ByteBuffer.allocate(4096);
while (fin.read(buff) != -1 || buff.position() > 0) {
buff.flip();
((Buffer) buff).flip();
fout.write(buff);
buff.compact();
}
Expand Down

0 comments on commit bf3c45d

Please sign in to comment.