Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.HashMap;
import java.util.Map;

public class Main {
    private static Map<String, String> FORMAT_TO_CONTENTTYPE = new HashMap<String, String>();

    public static String getContentType(String attFormat) {
        String contentType = FORMAT_TO_CONTENTTYPE.get("null");

        if (attFormat != null) {
            contentType = (String) FORMAT_TO_CONTENTTYPE.get(attFormat.toLowerCase());
        }
        return contentType;
    }
}