InputStreamからBitmapへの変換でのエラー
画像をリクエストしているのですが、SkImageDecoder::Factory returned nullとなります。
statuscodeは200でした。
URLはhttps://outlook.office365.com/owa/service.svc/s/GetFileAttachment?id=HOGEHOGE.です。
try {
HttpGet httpGet = new HttpGet(URL);
CookieManager cookie = CookieManager.getInstance();
String cookiestr = cookie.getCookie(URL);
httpGet.setHeader("Cookie", cookiestr);
DefaultHttpClient client = new DefaultHttpClient();
HttpResponse httpResponse = client.execute(httpGet);
int statusCode = httpResponse.getStatusLine().getStatusCode();
Log.d("","statusCode:"+statusCode);
HttpEntity entity = httpResponse.getEntity();
//String response = EntityUtils.toString(entity);
//Log.d("","response:"+response);
BufferedHttpEntity bufferedEntity = new BufferedHttpEntity(entity);
final InputStream in = bufferedEntity.getContent();
Bitmap bitm = BitmapFactory.decodeStream(in);
entity.consumeContent();
client.getConnectionManager().shutdown();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}