Java Activation Mimetype Check getMimetype(String filename)

Here you can find the source of getMimetype(String filename)

Description

get Mimetype

License

Open Source License

Declaration

public static String getMimetype(String filename) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import javax.activation.MimetypesFileTypeMap;

public class Main {
    private static final MimetypesFileTypeMap mimeMap = new MimetypesFileTypeMap();

    public static String getMimetype(String filename) {
        return mimeMap.getContentType(filename);
    }/*w  ww.  j a  v  a 2 s.c  o m*/
}

Related

  1. equal(String string1, String string2)
  2. getContentType(String filename)
  3. getContentType(String filePath)
  4. getContentTypeFromFileName(String fileName)
  5. getMimeType(final String filename)
  6. getMimeTypeForFileName(String filename)
  7. init()
  8. initFileTypeMap()
  9. isFileImage(String fileName)