aspose file tools
The moose likes Java in General and the fly likes how to insert carriage return Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "how to insert carriage return" Watch "how to insert carriage return" New topic
Author

how to insert carriage return

sv.srikrishna kitti
Greenhorn

Joined: Feb 14, 2010
Posts: 9
Program to convert ebcidc to unicode
I need to insert a carriage return after every bytes of data read.please tell me how this can be done.


Ireneusz Kordal
Ranch Hand

Joined: Jun 21, 2008
Posts: 423
Carriage return has code 13 - see here: http://www.asciitable.com/
You may write it to the file with a command: fout.write( 13 );
sv.srikrishna kitti
Greenhorn

Joined: Feb 14, 2010
Posts: 9
Thanks.Can i insert the same while reading bytes.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

Ireneusz Kordal wrote:Carriage return has code 13 - see here: http://www.asciitable.com/
You may write it to the file with a command: fout.write( 13 );

Don't write 13. Write '\r'. It's the exact same value but easier to read.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how to insert carriage return
 
Similar Threads
unable to preserve newline
Using streams
how to encrypt data into an image
Writing Hex Values to a file
Unable to read Arabic data