base64文字列データをバイト配列に変換するために以下のコードを開発しましたが、表示されていますIOException
public static EncodedImage getProfileByteArray(String profilePic){
byte[] data=profilePic.getBytes();
byte[] base64Data;
Bitmap bitmap=null;
EncodedImage fullImage=null;
try {
base64Data = Base64InputStream.decode(data, 0, data.length);
fullImage = EncodedImage.createEncodedImage(base64Data, 0, base64Data.length);
bitmap = fullImage.getBitmap();
System.out.println(data);
} catch (IOException e) {
e.printStackTrace();
System.out.println(e+"lkllllllllllllllll");
}
catch(Exception e){
System.out.println(e+"lkllllllllllllllll");
}
return fullImage;
}
The way is that i am calling a webservice through which i am getting base64 image string and trying to convert this base64 string to byte array to display image in EncodedImage
format.