W/CursorWindow(15677): 窗口已满:请求分配2195889字节,可用空间2096720字节,窗口大小2097152字节
我知道有可用的应用程序内存:
D/dalvikvm(15677):GC_FOR_ALLOC释放了9K,剩余30%的17050K / 24291K,暂停45ms
所以这纯粹与光标大小窗口有关,当将blob
读入byte[]
时。
我正在使用内置的方法从光标中读取。
try
{
c = rdb.query("Photos", new String[]{"photo"}, "id = ?", new String[]{""+photoID}, null, null, null);
if(c.moveToFirst())
{
byte[] tArray = c.getBlob(c.getColumnIndex("photo")); // THIS LINE ERRORS
}
}catch(Exception e)
{
e.printStackTrace();
}
c.close();
return tArray;
有没有绕过这个问题的方法?窗口大小似乎被限制在2097152字节。