Have a scenario where the httpentity have the binary data of a image in InputStream, for processing further its been converted as String in a library file[String str = EntityUtils.toString(httpResponse.getEntity())
] , now am trying to get the input stream back from that String.
Take the below scenario for understanding the issue:
Working - ImageView is displayed with content
InputStream inStream = getContentResolver().openInputStream(thisPhotoUri);
Bitmap bm = BitmapFactory.decodeStream(inStream);
ImageView view = (ImageView)findViewById(R.id.picture_frame);
view.setImageBitmap(bm);
Issue - ImageView is not displayed with image
InputStream inStream = getContentResolver().openInputStream(thisPhotoUri);
String str = inStream.toString();
InputStream is = new ByteArrayInputStream(str.getBytes());
Bitmap bm = BitmapFactory.decodeStream(is);
ImageView view = (ImageView)findViewById(R.id.picture_frame);
view.setImageBitmap(bm);