Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Have a stream write to a variable  RSS feed

 
S.Subhash Chandran
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i was recently programming JXTA - XSLT. the problem was that the processed output of my program - a html file had to be written to a output stream/writer. can i create a writer which can write to a string variable?
 
Mark Bensing
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep - take a look at java.io.StringWriter
Mark
 
S.Subhash Chandran
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tnx for that timely reply! it works great!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!