935090232@qq.com
2022-02-17 94f76200c0ac4d87e73afa4895f6088bfb02b6b2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.matrix.component.ueditor.define;
 
import java.util.HashMap;
import java.util.Map;
 
public class MIMEType {
 
    public static final Map<String, String> types = new HashMap<String, String>(){{
        put( "image/gif", ".gif" );
        put( "image/jpeg", ".jpg" );
        put( "image/jpg", ".jpg" );
        put( "image/png", ".png" );
        put( "image/bmp", ".bmp" );
    }};
    
    public static String getSuffix ( String mime ) {
        return MIMEType.types.get( mime );
    }
    
}