I wrote a small application i.e transfer files and directories from source to destination paths.I just use BufferedReader class and PrintWriter class but i got only .txt files were copied.how can i transfer any type of files like mp3,jpg.....
Originally posted by vasu chowdary: do you mean jpeg file can be read and write using stream classes like text files?
The Stream classes can be used for any type of file, because it just reads and writes the bytes of the file. It doesn't look at what those files mean.
For text files, the Reader and Writer classes are better since they are able to convert the bytes into actual characters. While for simple ASCII text files you won't notice much difference, you will feel differently when reading unicode text files.