Created
September 17, 2013 19:48
-
-
Save ggdio/6599582 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.ggdio.gists; | |
public enum MimeType | |
{ | |
GIF(".gif","image/gif"), | |
JPG(".jpg","image/jpg"), | |
JPEG(".jpeg","image/jpeg"), | |
BMP(".bmp","image/bmp"), | |
PNG(".png","image/png"), | |
DOC(".doc","application/msword"), | |
HTML("html","text/html"), | |
HTM(".htm","text/html"), | |
TXT(".txt","text/plain"), | |
XLS(".xls","application/ms-excel"), | |
XLSX(".xlsx","application/ms-excel"), | |
PDF(".pdf","application/pdf"), | |
ZIP(".zip","application/zip"), | |
RAR(".rar","application/rar"); | |
private String extension; | |
private String format; | |
private MimeType(String extension,String format) | |
{ | |
this.extension = extension; | |
this.format = format; | |
} | |
public String extension() | |
{ | |
return this.extension; | |
} | |
public String format() | |
{ | |
return this.format; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment