已找到解决方法
nt length = (int) conn.getContentLength(); Bitmap bitmap = null;
if (length != -1) {
byte[] imgData = new byte[length];
byte[] temp = new byte[512];
int readLen = 0;
int destPos = 0;
while ((readLen = mIs.read(temp)) > 0) {
System.arraycopy(temp, 0, imgData,
destPos, readLen);
destPos += readLen;
}
bitmap = BitmapFactory.decodeByteArray(
imgData, 0, imgData.length);
}
nt length = (int) conn.getContentLength(); Bitmap bitmap = null;
if (length != -1) {
byte[] imgData = new byte[length];
byte[] temp = new byte[512];
int readLen = 0;
int destPos = 0;
while ((readLen = mIs.read(temp)) > 0) {
System.arraycopy(temp, 0, imgData,
destPos, readLen);
destPos += readLen;
}
bitmap = BitmapFactory.decodeByteArray(
imgData, 0, imgData.length);
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货