Skip to content

Tag: base64

Convert base64 string to image

I am trying to crop/resize user profile image using jquery plugin namely crop.js which sends user image as base64 via ajax to my controller as but I unable to decode this base64 string as Image,Can you guys guide me how can I save my base64 string as image on my server?. Answer This assumes a few things, that…

How to get the JAR file for sun.misc.BASE64Encoder class?

I have some code in my Activity class that uses sun.misc.BASE64Encoder class. But it is showing java.lang.NoClassDefFoundError : sun.misc.BASE64Encoder. Do I need the jar? Where can I download it from? Answer Don’t use sun.* classes. For Base64 in Android, use its native class or add a library to your p…

Base64 decoding using JDK6 only

This question with regard to JDK 5 says, there is no implementation provided with JDK 5, but JDK 6 is supposed to have a sun.misc.Base64Decoder. As far as I can tell though, this class is not provided with the JDK and I was not able to find any other similar classes in itSo, what is the situation like with JD…

Decode base64Url in Java

https://web.archive.org/web/20110422225659/https://en.wikipedia.org/wiki/Base64#URL_applications talks about base64Url – Decode a modified Base64 for URL variant exists, where no padding ‘=’ will be used, and the ‘+’ and ‘/’ characters of standard Base64 are respectiv…