package com.cftech.core.util;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2017/5/5 0005.
 */
public class   FileType {
    @SuppressWarnings("serial")
    private static final Map<String, String> errCodeToErrMsg = new HashMap<String, String>(){{
        //通用返回
        put("image/jpeg",".jpg");
        put("image/png",".png");
        put("image/bmp",".bmp");
        put("image/gif",".gif");
    }};

    /**
     * 通过返回码获取返回信息
     */
    public static String get(String type){
        String result = errCodeToErrMsg.get(type);
        return result != null ? result : "未知返回码：" + type;
    }
}
