• Post Reply Bookmark Topic Watch Topic
  • New Topic

logging byte[]  RSS feed

 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I have a document object that returns a byte[] when I do getContents(), I want to log the contents of this byte[](this has post script data in it) to our log file. How do I it?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're certain that it contains printable characters only, then you can just use "new String(byte[])" to convert it to a string.
 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
byte[] is a post script file. It has numbers, alphabets and other characters (have not seen any unprintable characters). I have implemented your idea and testing it.

Ulf thanks for your help, will get back if I see any issues with it
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!