Skip to content Skip to sidebar Skip to footer

Java.lang.illegalargumentexception: Bad Base-64 When Decrypting Image

I am selecting an image using Jsoup parser Elements images = document.select('img'); String src = images.attr('src'); then using this code to get rid off data:image/jpg;base64 pur

Solution 1:

You are decoding with the flag Base64.URL_SAFE which uses - and _ in place of + and /, your base64 string includes /. Try changing the flag to Base64.DEFAULT


Post a Comment for "Java.lang.illegalargumentexception: Bad Base-64 When Decrypting Image"