已找到解决方法
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);
                                }