| | Hi, Is there a Base64 method from J2SE 1.4 API that can decode and encode a string? TIA. |
|
|
|
I read a claim that there was a method in java.util.prefs, but otherwise it seems like people have just gone and made their own classes and/or methods. I've also head that there is an undocumented method called sun.misc.BASE64Encoder.encode.
Anyway, if you want some Base64 encoding/decoding I suggest you either make your own class to handle it, or download any of the ones you find by googling for java base64.
Use Commons Codec from Apache Site
http://jakarta.apache.org/commons/codec/ in package org.apache.commons.codec.binary there is one class Base64 use static method : * decodeBase64(byte[] base64Data) * encodeBase64(byte[] binaryData) * and be careful it works in array of bytes not String * so beware of character encoding for Converting between your String to array of bytes. Hopes this help you.
Recent Queries:-
Keywords : base64 encode decode
|
|
![]() Base64 Encode And Decode |
| ADD REPLY / Got an Opinion! | Remove these ADs! | RAPID SEARCH! | Free Web Hosting | [X] |
|
Express your Opinions, Thoughts or Contribute more info. to help others. Ask your Doubts & Queries to get answers, So that "Together We can help others!" |
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP. | 500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE |
|