[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1879) Magic mime type detection support

Michael Wohlfart (JIRA) jira-events at lists.jboss.org
Mon Oct 5 13:29:49 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBSEAM-1879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12488473#action_12488473 ] 

Michael Wohlfart commented on JBSEAM-1879:
------------------------------------------

2 years later... there are some other options besides jmimemagic:
* http://lucene.apache.org/tika/
* http://www.medsea.eu/mime-util/

mime-util seems to be light weight, well supported and easy to integrate, not sure if it can be integrated in seam though since it is distributed under the Apache License 2.0 :-/

> Magic mime type detection support
> ---------------------------------
>
>                 Key: JBSEAM-1879
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-1879
>             Project: 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: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list