Review Request: JDK-7142921, (fs) Files.probeContentType reports a MIME type of "text/plain" on Ubuntu 11.04
zhong.j.yu at gmail.com
Tue Nov 27 08:08:39 PST 2012
On Tue, Nov 27, 2012 at 9:37 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 27/11/2012 15:36, Zhong Yu wrote:
>> On Tue, Nov 27, 2012 at 9:25 AM, Alan Bateman<Alan.Bateman at oracle.com>
>>> 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
>>> 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.
> I haven't used JAF but doesn't it have a constructor that allows you to
> specify the mime.types files?
Yes, but the constructor calls the default constructor first, loading
other mime.types files
More information about the nio-dev