Review Request: JDK-7142921, (fs) Files.probeContentType reports a MIME type of "text/plain" on Ubuntu 11.04

Mike Duigou mike.duigou at
Mon Nov 26 10:27:08 PST 2012

I am concerned about relying on the location of the mime.types file on mac :


The Apache installation included in MacOS X was partially disabled in Mountain Lion  (10.8) and it seems possible that they will eventually remove it or replace it with a different server.


On Nov 25 2012, at 22:40 , Dan Xu wrote:

> Hi,
> Please help review the code changes for CR 7142921 and CR 7144997. The webrev is uploaded to,
> In the fix, I added two new file type detectors, one is MimeTypesFileTypeDetector, and the other is MagicFileTypeDetector. MimeTypesFileTypeDetector is using a file name extension to look up its MIME type by checking mime.types files, which can be used in Linux, Solaris, and Mac. MagicFileTypeDetector is using libmagic to detect a file type in Linux. The library, libmagic, is provided in the same package of file command, which is currently only available in Linux platform.
> Thanks,
> -Dan

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the nio-dev mailing list