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

Zhong Yu zhong.j.yu at
Tue Nov 27 07:36:16 PST 2012

On Tue, Nov 27, 2012 at 9:25 AM, Alan Bateman <Alan.Bateman at> wrote:
> On 27/11/2012 15:20, Zhong Yu wrote:
>> I wish MimeTypesFileTypeDetector is a public utility class, so that an
>> applications can use it directly against a fixed "mime.types" file.
>> Some applications couldn't care less about what OS thinks about file
>> types, since the applications are supposed to be OS-independent. They
>> need predictable and stable file type mapping.
>> (Of course, they can always implement their own
>> MimeTypesFileTypeDetectors)
> Are you looking for javax.activiation.MimetypesFileTypeMap?

Not exactly, that one still depends on factors outside app's control.
I meant a file type mapping based on a specific mime.types file.

> -Alan

More information about the nio-dev mailing list