dcsimg

How do I copy a file?

John Zukowski

To make a copy of a file, open the source file as a FileInputStream. Open the destination as a FileOutputStream. As you read a byte from the input, write it to the output. There is no built-in method to make a file copy for you.