i am copy a file from one location to another. if i am using PrintWriter's println() its working fine. when i am using newLine() all lines are printed in the same line itself. why it is not working properly?
[RT]: i am copy a file from one location to another.
I would recommend you forget about Readers and Writers here, and use a FileInputstream and FileOutputStream instead. Or use a FileChannel. Oversimplfied examples are here and here. Using Readers and Writers can result in complications if you don't know the details of the character encoding to be used with a file, and possible complications with line separators when going from Unix to Windows or vice-versa. If you simply want to make an identical copy of a file, ignore these issues and copy the raw bytes - that's what FileInputStream, FileOutputStream, and FileChannel allow you to do. [ November 30, 2005: Message edited by: Jim Yingst ]