Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to identify MIME-Type from java Blob object???

843859Jan 29 2007 — edited Jan 30 2007
HI All,

In our J2EE application, we need to upload attachments and store them as BLOB in Oracle DB.

We are storing only blob obj in table and not other info like mime-type, file name etc.

Can anyone guide me about finding meta data from BLOB/byte[]??
I have read somewhere that every file stores its meta data in byte[]..like PDF files starts with(1st 5 bytes) '%PDF-' JPEG file starts with
' FF D8 FF E0' etc.

Do java provide any API/class to find this info??


Thanks much,

shilpa.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 27 2007
Added on Jan 29 2007
4 comments
964 views