aspose file tools*
The moose likes Java in General and the fly likes Base64 encode decode jars Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Base64 encode decode jars" Watch "Base64 encode decode jars" New topic
Author

Base64 encode decode jars

Sam Gehouse
Ranch Hand

Joined: Jul 21, 2003
Posts: 281
Could you please list a few good links for getting jars for Base64 encoding and decoding using Java?
Grant Gainey
Ranch Hand

Joined: Oct 16, 2005
Posts: 65
http://iharder.sourceforge.net/base64/

'Course, I just use the sun.misc.BASE64En/Decoder classes - they're not officially supported, but they do the job.

Grant


In Theory, there is no difference between theory and practice.<br />In Practice, there is no relationship between theory and practice.
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608

they're not officially supported, but they do the job.

The important point is that it ties you to one particular implementation of the VM. Are you (anyone who wants to use base64) willing to accept this limitation at the expense of saving a few lines of code? Your call. I've written a decoder/encoder, but it's proprietrary - I'll try to get one out in a OSS release some time.


Tony Morris
Java Q&A (FAQ, Trivia)
Grant Gainey
Ranch Hand

Joined: Oct 16, 2005
Posts: 65
Originally posted by Tony Morris:

The important point is that it ties you to one particular implementation of the VM. Are you (anyone who wants to use base64) willing to accept this limitation at the expense of saving a few lines of code? Your call.


True enough. It's more than just the "few lines of code", though - it's adding Yet Another Jar to the project/distribution, and the hassle of convincing your legal team that it's OK to add as part of the product.

Originally posted by Tony Morris:

I've written a decoder/encoder, but it's proprietrary - I'll try to get one out in a OSS release some time.

Why does everybody write their own B64 code? There are MANY public domain implementations available (as one would expect from a public, easy-to-implement standard). I've used B64 for...a very long time, actually...but I've never implemented it myself. But then, I suspect the question is its own answer - it is an easy thing to implement, and it can certainly be a pain getting approval for adding that one more jarfile to the product. Never mind - I'll go back to my corner now...

Grant

[Edited for tag errors]
[ October 20, 2005: Message edited by: Grant Gainey ]
Ray Horn
Ranch Hand

Joined: Oct 20, 2005
Posts: 39
Try the Jakarta Commons Project (open source). Here is a page
into an article explaining the Base64 codec. I have not used it
myself but hopefully the article points you in the right direction.

http://www.onjava.com/pub/a/onjava/2003/07/09/commons.html
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608

the hassle of convincing your legal team

...and here I was thinking you were sympathising with me
I wrote my own base64 encoder/decoder for two reasons:
a) my legal team with regard to shipping OSS
b) The existing encoders/decoders are suboptimal in my opinion (I didn't reinvent the wheel; I made it more round)
Grant Gainey
Ranch Hand

Joined: Oct 16, 2005
Posts: 65
Originally posted by Tony Morris:

...and here I was thinking you were sympathising with me


Heh. I always have sympathy for developers trying to get OSS source into their products. At one point, heard a company say "it's more cost effective for us to pay developers to reimplement that functionality than to pay the lawyers to investigate the legal issues." (Not said to me, thank goodness - but I know it happens).

Originally posted by Tony Morris:

I wrote my own base64 encoder/decoder for two reasons:
a) my legal team with regard to shipping OSS
b) The existing encoders/decoders are suboptimal in my opinion (I didn't reinvent the wheel; I made it more round)


Fair enough. For myself, I've tripped over enough square (or even triangular) wheels in large applications that I've gotten better at leaving the mostly-round parts alone...

Grant
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Base64 encode decode jars