SQLite 如何在单个 table 单元格中存储字节数组

SQLite how to store a byte array in a single table cell

我正在使用 SQLite 数据库来存储我的 Android 数据。 如何将字节数组 byte[] 存储在单个单元格中。 因为只有 int 或 strings 这样的类型。

我听说了一些关于 BLOB 的事情,也许你能给我解释一下?

另一种选择是将字节数组转换为字符串,使用时再转换回来。我该怎么做?

与其他类型一样,ContentValues.put() and Cursor.getBlob() 函数直接支持字节数组。