【发布时间】:2012-03-12 20:05:58
【问题描述】:
我想将 blob 数据存储到 sqlite 中,尽管 bloc 具有价值,但它将 imageData 添加为 null。我应该将什么 bloc 值放入 sql 中?
String x = getResultAsOnlyValue("soapImage", xdata);
byte[] bloc = Base64.decode(x, Base64.DEFAULT);
Bitmap bmp = BitmapFactory.decodeByteArray(bloc,0,bloc.length);
SQLiteStatement statement = db.compileStatement("insert into ImageTable (imageData) values(?)");
statement.bindBlob(0, bloc);
statement.execute();
【问题讨论】: