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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
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: 19762
    
  20

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to insert carriage return