Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Byte array output stream to a off file  RSS feed

 
upanshu vaid
Ranch Hand
Posts: 83
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
As java Jdk support writing output stream to a plain text file.
My requirement is that I have a byte array outputstream now how to write that to a pdf file through coding.
 
upanshu vaid
Ranch Hand
Posts: 83
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone from ranch reply .
Thanks
 
Paul Clapham
Sheriff
Posts: 22374
42
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, no, Java supports writing an output stream to any file whatsoever. That's not restricted to text; if you're writing text you should use a Writer anyway, not an OutputStream.

So what's in that "output stream"? Presumably it's not data in PDF format, or you would already have tried writing it to a file with success and you wouldn't be waiting for help here. In which case, you're going to have to do something to convert it to PDF format.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!