how to store Image as blob in Sqlite & how to retrieve it?

后端 未结 6 1021
野的像风
野的像风 2020-11-22 04:31

I want to store an image(from url) into a sqlite database.

For that I use:

db = new DataBase(getApplicationContext());
URL url = new URL(\"http://sr         


        
6条回答
  •  天涯浪人
    2020-11-22 05:00

    byte[] byteArray = rs.getBytes("columnname");  
    
    Bitmap bm = BitmapFactory.decodeByteArray(byteArray, 0 ,byteArray.length);
    

提交回复
热议问题