package com.owncloud.android.datamodel;
import java.io.File;
+import java.io.InputStream;
import java.lang.ref.WeakReference;
import org.apache.commons.httpclient.HttpStatus;
GetMethod get = new GetMethod(uri);
status = mClient.executeMethod(get);
if (status == HttpStatus.SC_OK) {
- byte[] bytes = get.getResponseBody();
- Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0,
- bytes.length);
+// byte[] bytes = get.getResponseBody();
+// Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0,
+// bytes.length);
+ InputStream inputStream = get.getResponseBodyAsStream();
+ Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
thumbnail = ThumbnailUtils.extractThumbnail(bitmap, px, px);
// Add thumbnail to cache