0

Hai Fiends,


I need to add \r\n(if \n is present or not) at end of every line of a huge file.
how can i do this in java, with high performance. please help me in this problem.

3
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by softswing
0

please help me in this problem, how to add /r/n in end of every line of a file in java.

0

You're just going to have to read the source file,and write a copy to an output file, replacing line end characters when you encounter them. Provided you use buffered streams for both files there's not a lot you can do to affect the performance.

0

> please help me in this problem, how to add /r/n in end of every line of a file in java.

Are you really required to use Java? If not, the simplest and fastest way would be to use "unix2dos" utility if you are on a Unix box or just open the file in Notepad++ -> Format -> Convert to Windows format.

0

> please help me in this problem, how to add /r/n in end of every line of a file in java.

Are you really required to use Java? If not, the simplest and fastest way would be to use "unix2dos" utility if you are on a Unix box or just open the file in Notepad++ -> Format -> Convert to Windows format.

I want to do this in java...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.