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.