Faster way of copying data in Java?
I have been given a task of copying data from a server. I am using BufferedInputStream and output stream to copy the data and I am doing it byte by byte. Even though it is running but It is taking ages to copy the data as some of them are in 100's MBs, so definitely it is not gonna work. Can anyone suggest me any alternate of Byte by Byte copy so that my code can copy file that are in few Hundred MBs. Buffer is 2048. Here is how my code look like: static void copyFiles(SmbFile[] files, String parent) throws IOException { SmbFileInputStream input = null; FileOutputStream output = null;