Java has two kinds of classes for I/O:
Streams (InputStreams and OutputStreams) are for reading and writing binary data.Readers and Writers are for reading files that can be interpreted as characters (text) using a character encoding.
Trying to read and write files that contain data that is not meant to be interpreted as text, such as *.zip and *.exe files, will lead to problems. You might get an exception while reading the file, for example if the character encoding that converts the bytes to characters encounters a sequence of bytes that cannot be properly interpreted as text. You might also get a corrupted output file, because the conversion from bytes to characters and back to bytes is not always 100% reversible (for complicated reasons).
If you just want to copy files, then use InputStreams and OutputStreams to do so (that will also work for text files). You can find
examples easily by searching.