aspose file tools*
The moose likes Java in General and the fly likes writing text file to outputstream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "writing text file to outputstream" Watch "writing text file to outputstream" New topic
Author

writing text file to outputstream

Ankit Chandrawat
Ranch Hand

Joined: Jan 03, 2008
Posts: 87
Hi,

I have a text file that I want to read and write it to outputstream. For that I am using ByteArrayOutputStream. The text file should be read line by line and after each line a linebreak character should be inserted. How can I implement this. Also is there any other better way through which I can achieve the same. Attached is the image showing how it is being displayed now.

TIA,
Ankit Chandrawat


[Download view.bmp] Download

John de Michele
Rancher

Joined: Mar 09, 2009
Posts: 600
Ankit:

Googling 'java io outputstream tutorial' will give you several examples.

John.
 
Don't get me started about those stupid light bulbs.
 
subject: writing text file to outputstream