Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**
     * @return An explicit MIME data type.
     */
    public static String getMIMEType(String file_name) {
        if (file_name.endsWith(".txt")) {
            return "text/plain";
        } else if (file_name.endsWith(".apk")) {
            return "application/vnd.android.package-archive";
        } else {
            return "*/*";
        }
    }
}