I\'ve got bytes array in database.
How to extract file extension (mime/type) from byte array in java?
Maybe I need to save additional column in my DB for file extension.
That is a better solution than attempting to deduce a mimetype based on the database content, for (at least) the following reasons:
(I'm making some assumptions that may not be warranted, but the question doesn't give any clues on how the larger system is intended to work.)