Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

writing text file to outputstream

 
Ankit Chandrawat
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Filename: view.bmp
Description: presently this is how the text is visible on the jsp
File size: 586 Kbytes
[Download view.bmp] Download Attachment
 
John de Michele
Rancher
Posts: 600
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ankit:

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

John.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic