Magic mime type detection support
---------------------------------
Key: JBSEAM-1879
URL:
http://jira.jboss.com/jira/browse/JBSEAM-1879
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Reporter: Christian Bauer
Priority: Minor
A component I can call to find out what mime type a particular byte[] or ByteInputStream
is. The only existing solution in Java is
http://sourceforge.net/projects/jmimemagic/ but
it's basically an unmaintained half-working pile of junk.
It's interesting that nobody ever build a simple port of file(1), which you get on
every unix box, together with a fantastic (/etc/magic or /usr/share/file/magic on the Mac)
database of magic bytes found in file headers. We should just take that database (or the
source database from which it is generated) and write our own file(1) for Seam. Search for
"mime magic java" with Google and you see why it's needed. Try "file
myfile.foo" on every unix box (well, younger than 10 years) and you see how it
works.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira