0

Possible Duplicate:
Decode Base64 data in java

I have a java file which will be downloaded from a location. The files are BinHex encoded. Is there any jar file available which i can use in java code to decode the binhex file?

Please help me.

Community
  • 1
  • 1
user1332962
  • 91
  • 1
  • 3
  • 11
  • 1
    [BinHex](http://en.wikipedia.org/wiki/BinHex) appears to be related to Base64, but is actually quite different. So in particular as the OP asks about a ready-to-use library, instead of ideas how to implement a decoder, this is not a duplicate. The [repeated question](http://stackoverflow.com/q/12645528) asked by the same user later on is a duplicate, but I assume it only was posted because this one here got closed. The two questions should be merged eventually. Perhaps by duplicating this one here to that one there, instead of the current [Base64](http://stackoverflow.com/questions/469695). – MvG Sep 28 '12 at 21:49

1 Answers1

0

Apache commons has a class called BCodec that allows specifying custom character sequence for encoding. Maybe you can adapt it to your needs?

In any case mechanics behind Base64 and BinHex are very similar, you could take this class and update it to your needs. I think modifying char sequence may be enough.

EDIT:

Here's an implementation of BinConverter as a part of BlowfishJ library.

Ivan Koblik
  • 4,285
  • 1
  • 30
  • 33