Here you can find the source of setMinetypes()
public static void setMinetypes()
//package com.java2s; //License from project: Open Source License import javax.activation.MimetypesFileTypeMap; public class Main { private static final MimetypesFileTypeMap mimeTypeMap = new MimetypesFileTypeMap(); public static void setMinetypes() { mimeTypeMap.addMimeTypes("text/plain txt"); mimeTypeMap.addMimeTypes("text/html html htm xhtml"); mimeTypeMap.addMimeTypes("text/javascript js"); mimeTypeMap.addMimeTypes("text/css css"); mimeTypeMap.addMimeTypes("image/png png"); mimeTypeMap.addMimeTypes("image/jpeg jpeg"); mimeTypeMap.addMimeTypes("image/jpeg jpg"); mimeTypeMap.addMimeTypes("image/gif gif"); mimeTypeMap.addMimeTypes("image/x-icon ico"); mimeTypeMap.addMimeTypes("application/xml xml"); mimeTypeMap.addMimeTypes("application/json json"); mimeTypeMap.addMimeTypes("application/pdf pdf"); }//from www.j a v a 2s. c o m }