开发者

Writing binary data in a sqlite database Android's ContentResolver

I'm reading some sources for Android, and I read this:

OutputStream thumbOut = mCr.openOutputStream(uri);
bitmap.compress(Bitmap.CompressFormat.JPEG, 85, thumbOut);
thumbOut.close();

when trying to store a bitmap (bitmap) in a database (uri is the URI of a row in the database). As far as I can understand, openOutputStream allows to store binary data in the data开发者_JAVA技巧base, but only the path of the file is placed in the DB. The file is placed somewhere in the filesystem. Is this correct? My question is: how do I specify the exact location of the files when stored this way? Thanks for any clarification.


I suppose the correct answer to this question was that the used path is the one already inserted in the database.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜