我知道将图片导入BMP是:
String t1="http://www.xxx.xxx/xx/xx.jpg";
URL TKs = new URL(t1);
InputStream Is= TKs.openStream();
Bitmap Bp = BitmapFactory.decodeStream(Is);
Is.close();
我也知道把图片转成可以用SQL存储的格式:
is = resources.openRawResource(R.drawable.xxx);
byte[] image2 = new byte[is.available()];
is.read(image2);
is.close();
我用这两种方法应该都能达到我的目的:
String t1="http://www.xxx.xxx/xx/xx.jpg";
URL TKs = new URL(t1);
InputStream Is= TKs.openStream();
byte[] image2 = new byte[Is.available()];
//////////////////the image2 is NULL
Is.read(image2);
Is.close();
明明我失败了我想问我到底怎么办?