• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Binary to Ascii converter in Java?

 
Prasanth Pillai
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

Is there any option available in java to convert a binary file to ascii file? Any help is greatly appreciated.

regards,
prasanth
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not in general. You'd have to have some rules about how the conversion was supposed to work. For example if I had a file containing six binary 00 bytes, what would you expect as the "ASCII equivalent" of that?

Once you have some rules in mind, it may be easier to find products that implement those rules.
 
Prasanth Pillai
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the response. I was under the assumption that its a generalized one. Because I see many tools available in the internet for this convertion. So I was wondering whether is there any such tool which can be integrated with a java code?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you point us to a tool somewhere on the Internet which does this conversion, perhaps we could look at it and thus learn what it is you really want to do. But as Paul said, gently, there is no such thing as a generic binary-to-ASCII conversion -- the concept simply doesn't make any sense.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
both binary files and text files contains bytes only.So if you binary file contains valid ascii bytes ,then you try to open the file using any ascii editor.
I could not get properly what you mean by converting binary to ascii?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic