Possible duplicate:Decode Base64 data in java
I am working on a java profile, I want to know how to convert base64 string to byte array. can someone request a code and fule will be useful to me.
You can also use Apache Commons Codec ( http://commons.apache.org/codec/ )
String example = "SGVsbG8gV29ybGQ=" byte[] decoded = org.apache.commons.codec.binary.Base64.decodeBase64(example .getBytes());
import sun.misc.BASE64Decoder; BASE64Decoder decoder = new BASE64Decoder(); byte[] imageByte = decoder.decodeBuffer(imageData);
Where imageData is a string containing Base64 data.
imageData
Source: https://habr.com/ru/post/920388/More articles:Why implement an interface on viewmodel and view in mvvm - wpfCall a function without waiting for it - javaHow to "clear" WinAPI transparent window - c ++Rails, Geocoder and nearby - ruby ββ| fooobar.comwhat is used in ruby? - syntaxVia! in Rubin - ruby ββ| fooobar.comChanging the height of user inputView when turning the device - ios"ld: library not found for -lXYZ" means what? What are the different options? - iosprogrammatically find the size of a float - javaMagento: getting your own quote-position field for an order - orderAll Articles