• Post Reply Bookmark Topic Watch Topic
  • New Topic

How To Display a Binary file

 
Venkata Rao
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can Read and display the contents of a binary file into a string as binary data.
Ex: I have a file "abc" which has some encrypted data.
{ ���4�6G����0��D�€�G�=��P }
Now I want to capture this data in a String variable say "str" as binary .
which means when I use System.out.println(str) then I should get the original binary data that is present in the file..
I don't have to worry about converting the binary data into text format.. All I am worried about is how can I get that binary data as it is into a String variable.
Any thoughts are appreciated...
/* For reference
String str = "���4�6G����0��D�€�G�=��P"; */

-Thanks,
-Venkat
 
Vadiraj Deshpande
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Not sure of this but I think this is what you need to do.

HTH
A
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!