1

I am working with a third party SQLite database. It has a BLOB column that may contain an image, video or audio file. Of course, there is another column that specifies the mime type of the BLOB. My question is, is there a generic way of converting from BLOB to byte array and byte array to blob. I have seen tons of examples around the web but they are specific to images. I am looking for a generic method of working with the blob regardless of it's type.

NOTE: I know it is not a good idea to save these types of files in the db but in this case I have no choice.

1 Answer 1

2

The Android database API already used byte arrays to represent blobs; no conversion is needed.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.