wood burning stoves 2.0*
The moose likes Java in General and the fly likes how to insert carriage return Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
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: 19679
    
  18

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 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to insert carriage return