/*
 * Copyright (c) 2004-2017, by Alex Leigh.
 * All rights reserved.
 *
 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE
 * The copyright notice above does not evidence any
 * actual or intended publication of such source code.
 */

package lc.mecha.http.server;

import javax.activation.MimetypesFileTypeMap;

/**
 * Utility methods for interacting with MIME types.
 *
 * @author Alex Leigh
 */
public class MimeUtil {
    public static MimetypesFileTypeMap defaultMapper() {
        final MimetypesFileTypeMap mimeMap = new MimetypesFileTypeMap();
        mimeMap.addMimeTypes("text/css css");
        mimeMap.addMimeTypes("text/html html");
        mimeMap.addMimeTypes("application/json json");
        mimeMap.addMimeTypes("text/javascript js");
        mimeMap.addMimeTypes("image/png png");
        mimeMap.addMimeTypes("application/vnd.ms-excel xls xlt xla");
        mimeMap.addMimeTypes("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx");
        return mimeMap;
    }

}
