大家好,又见面了,我是你们的朋友全栈君。
1.常见的content type:
.aiff = audio/aiff
.anv = application/x-anv
.asa = text/asa
.asf = video/x-ms-asf
.asp = text/asp
.asx = video/x-ms-asf
.au = audio/basic
.avi = video/avi
.awf = application/vnd.adobe.workflow
.biz = text/xml
.bmp = application/x-bmp
.bot = application/x-bot
.c4t = application/x-c4t
.c90 = application/x-c90
.cal = application/x-cals
.cat = application/vnd.ms-pki.seccat
.cdf = application/x-netcdf
.cdr = application/x-cdr
.cel = application/x-cel
.cer = application/x-x509-ca-cert
.cg4 = application/x-g4
.cgm = application/x-cgm
.cit = application/x-cit
.class = java/*
.cml = text/xml :客户端浏览器按XML格式进行解析文档
.cmp = application/x-cmp
.cmx = application/x-cmx
.cot = application/x-cot
.crl = application/pkix-crl
.crt = application/x-x509-ca-cert
.csi = application/x-csi
.css = text/css :客户端浏览器按CSS格式进行解析文档
.cut = application/x-cut
.dbf = application/x-dbf
.dbm = application/x-dbm
.dbx = application/x-dbx
.dcd = text/xml :客户端浏览器按XML格式进行解析文档
.dcx = application/x-dcx
.der = application/x-x509-ca-cert
.dgn = application/x-dgn
.dib = application/x-dib
.dll = application/x-msdownload
.doc = application/msword
.dot = application/msword
.drw = application/x-drw
.dtd = text/xml :客户端浏览器按XML格式进行解析文档
.dwf = Model/vnd.dwf
.dwf = application/x-dwf
.dwg = application/x-dwg
.dxb = application/x-dxb
.dxf = application/x-dxf
.edn = application/vnd.adobe.edn
.emf = application/x-emf
.eml = message/rfc822
.ent = text/xml :客户端浏览器按XML格式进行解析文档
.epi = application/x-epi
.eps = application/x-ps
.eps = application/postscript
.etd = application/x-ebx
.exe = application/x-msdownload
.fax = image/fax
.fdf = application/vnd.fdf
.fif = application/fractals
.fo = text/xml :客户端浏览器按XML格式进行解析文档
.frm = application/x-frm
.g4 = application/x-g4
.gbr = application/x-gbr
.gcd = application/x-gcd
.gif = image/gif
.gl2 = application/x-gl2
.gp4 = application/x-gp4
.hgl = application/x-hgl
.hmr = application/x-hmr
.hpg = application/x-hpgl
.hpl = application/x-hpl
.hqx = application/mac-binhex40
.hrf = application/x-hrf
.hta = application/hta
.htc = text/x-component
.htm = text/html :客户端浏览器按超文本格式进行解析文档
.html = text/html :客户端浏览器按超文本格式进行解析文档
.htt = text/webviewhtml
.htx = text/html :客户端浏览器按超文本格式进行解析文档
.icb = application/x-icb
.ico = image/x-icon
.ico = application/x-ico
.iff = application/x-iff
.ig4 = application/x-g4
.igs = application/x-igs
.iii = application/x-iphone
.img = application/x-img
.ins = application/x-internet-signup
.isp = application/x-internet-signup
.IVF = video/x-ivf
.java = java/*
.jfif = image/jpeg
.jpe = image/jpeg
.jpe = application/x-jpe
.jpeg = image/jpeg
.jpg = image/jpeg
.jpg = application/x-jpg
.js = application/x-javascript
.jsp = text/html :客户端浏览器按超文本格式进行解析文档
.la1 = audio/x-liquid-file
.lar = application/x-laplayer-reg
.latex = application/x-latex
.lavs = audio/x-liquid-secure
.lbm = application/x-lbm
.lmsff = audio/x-la-lms
.ls = application/x-javascript
.ltr = application/x-ltr
.m1v = video/x-mpeg
.m2v = video/x-mpeg
.m3u = audio/mpegurl
.m4e = video/mpeg4
.mac = application/x-mac
.man = application/x-troff-man
.math = text/xml
.mdb = application/msaccess
.mdb = application/x-mdb
.mfp = application/x-shockwave-flash
.mht = message/rfc822
.mhtml = message/rfc822
.mi = application/x-mi
.mid = audio/mid
.midi = audio/mid
.mil = application/x-mil
.mml = text/xml
.mnd = audio/x-musicnet-download
.mns = audio/x-musicnet-stream
.mocha = application/x-javascript
.movie = video/x-sgi-movie
.mp1 = audio/mp1
.mp2 = audio/mp2
.mp2v = video/mpeg
.mp3 = audio/mp3
.mp4 = video/mpeg4
.mpa = video/x-mpg
.mpd = application/vnd.ms-project
.mpe = video/x-mpeg
.mpeg = video/mpg
.mpg = video/mpg
.mpga = audio/rn-mpeg
.mpp = application/vnd.ms-project
.mps = video/x-mpeg
.mpt = application/vnd.ms-project
.mpv = video/mpg
.mpv2 = video/mpeg
.mpw = application/vnd.ms-project
.mpx = application/vnd.ms-project
.mtx = text/xml
.mxp = application/x-mmxp
.net = image/pnetvue
.nrf = application/x-nrf
.nws = message/rfc822
.odc = text/x-ms-odc
.out = application/x-out
.p10 = application/pkcs10
.p12 = application/x-pkcs12
.p7b = application/x-pkcs7-certificates
.p7c = application/pkcs7-mime
.p7m = application/pkcs7-mime
.p7r = application/x-pkcs7-certreqresp
.p7s = application/pkcs7-signature
.pc5 = application/x-pc5
.pci = application/x-pci
.pcl = application/x-pcl
.pcx = application/x-pcx
.pdf = application/pdf :客户端浏览器按PDF格式进行解析文档
.pdf = application/pdf
.pdx = application/vnd.adobe.pdx
.pfx = application/x-pkcs12
.pgl = application/x-pgl
.pic = application/x-pic
.pko = application/vnd.ms-pki.pko
.pl = application/x-perl
.plg = text/html
.pls = audio/scpls
.plt = application/x-plt
.png = image/png
.png = application/x-png
.pot = application/vnd.ms-powerpoint
.ppa = application/vnd.ms-powerpoint
.ppm = application/x-ppm
.pps = application/vnd.ms-powerpoint
.ppt = application/vnd.ms-powerpoint
.ppt = application/x-ppt
.pr = application/x-pr
.prf = application/pics-rules
.prn = application/x-prn
.prt = application/x-prt
.ps = application/x-ps
.ps = application/postscript
.ptn = application/x-ptn
.pwz = application/vnd.ms-powerpoint
.r3t = text/vnd.rn-realtext3d
.ra = audio/vnd.rn-realaudio
.ram = audio/x-pn-realaudio
.ras = application/x-ras
.rat = application/rat-file
.rdf = text/xml
.rec = application/vnd.rn-recording
.red = application/x-red
.rgb = application/x-rgb
.rjs = application/vnd.rn-realsystem-rjs
.rjt = application/vnd.rn-realsystem-rjt
.rlc = application/x-rlc
.rle = application/x-rle
.rm = application/vnd.rn-realmedia
.rmf = application/vnd.adobe.rmf
.rmi = audio/mid
.rmj = application/vnd.rn-realsystem-rmj
.rmm = audio/x-pn-realaudio
.rmp = application/vnd.rn-rn_music_package
.rms = application/vnd.rn-realmedia-secure
.rmvb = application/vnd.rn-realmedia-vbr
.rmx = application/vnd.rn-realsystem-rmx
.rnx = application/vnd.rn-realplayer
.rp = image/vnd.rn-realpix
.rpm = audio/x-pn-realaudio-plugin
.rsml = application/vnd.rn-rsml
.rt = text/vnd.rn-realtext
.rtf = application/msword
.rtf = application/x-rtf
.rv = video/vnd.rn-realvideo
.sam = application/x-sam
.sat = application/x-sat
.sdp = application/sdp
.sdw = application/x-sdw
.sit = application/x-stuffit
.slb = application/x-slb
.sld = application/x-sld
.slk = drawing/x-slk
.smi = application/smil
.smil = application/smil
.smk = application/x-smk
.snd = audio/basic
.sol = text/plain
.sor = text/plain
.spc = application/x-pkcs7-certificates
.spl = application/futuresplash
.spp = text/xml
.ssm = application/streamingmedia
.sst = application/vnd.ms-pki.certstore
.stl = application/vnd.ms-pki.stl
.stm = text/html
.sty = application/x-sty
.svg = text/xml
.swf = application/x-shockwave-flash :客户端浏览器按 Flash 格式进行解析文档
.tdf = application/x-tdf
.tg4 = application/x-tg4
.tga = application/x-tga
.tif = image/tiff
.tif = application/x-tif
.tiff = image/tiff
.tld = text/xml
.top = drawing/x-top
.torrent = application/x-bittorrent
.tsd = text/xml
.txt = text/plain :客户端浏览器按 纯文本 格式进行解析文档
.uin = application/x-icq
.uls = text/iuls
.vcf = text/x-vcard
.vda = application/x-vda
.vdx = application/vnd.visio
.vml = text/xml
.vpg = application/x-vpeg005
.vsd = application/vnd.visio
.vsd = application/x-vsd
.vss = application/vnd.visio
.vst = application/vnd.visio
.vst = application/x-vst
.vsw = application/vnd.visio
.vsx = application/vnd.visio
.vtx = application/vnd.visio
.vxml = text/xml
.wav = audio/wav
.wax = audio/x-ms-wax
.wb1 = application/x-wb1
.wb2 = application/x-wb2
.wb3 = application/x-wb3
.wbmp = image/vnd.wap.wbmp
.wiz = application/msword
.wk3 = application/x-wk3
.wk4 = application/x-wk4
.wkq = application/x-wkq
.wks = application/x-wks
.wm = video/x-ms-wm
.wma = audio/x-ms-wma
.wmd = application/x-ms-wmd
.wmf = application/x-wmf
.wml = text/vnd.wap.wml
.wmv = video/x-ms-wmv
.wmx = video/x-ms-wmx
.wmz = application/x-ms-wmz
.wp6 = application/x-wp6
.wpd = application/x-wpd
.wpg = application/x-wpg
.wpl = application/vnd.ms-wpl
.wq1 = application/x-wq1
.wr1 = application/x-wr1
.wri = application/x-wri
.wrk = application/x-wrk
.ws = application/x-ws
.ws2 = application/x-ws
.wsc = text/scriptlet
.wsdl = text/xml
.wvx = video/x-ms-wvx
.xdp = application/vnd.adobe.xdp
.xdr = text/xml
.xfd = application/vnd.adobe.xfd
.xfdf = application/vnd.adobe.xfdf
.xhtml = text/html
.xls = application/vnd.ms-excel
.xls = application/x-xls
.xlw = application/x-xlw
.xml = text/xml
.xpl = audio/scpls
.xq = text/xml
.xql = text/xml
.xquery = text/xml
.xsd = text/xml
.xsl = text/xml
.xslt = text/xml
.xwd = application/x-xwd
.x_b = application/x-x_b
.x_t = application/x-x_t
2.利用python处理成switch语句分支
import io
file = open(‘content.txt’)
text = ”
while(True):
line = file.readline()
words = line.split(‘=’)
if (len(words) > 1):
w_cases = words[0].replace(‘.’, ”).replace(‘ ‘, ”)
w_retrun = words[1].replace(‘ ‘, ”).replace(‘\n’, ”)
text += ‘case “‘ + w_cases + ‘”:\r\nreturn “‘ + w_retrun + ‘”;\r\n’
if not line:
break;
print(text)
file.close()
w_file = open(r’t.txt’, ‘w’)
w_file.write(text)
w_file.close()
3.生成getContentType方法
/**
* 根据文件后缀设置 content type
*
* @param ext 需要小写
* @return
*/
private String getContentType(String ext) {
switch (ext) {
case “aiff”:
return “audio/aiff”;
case “anv”:
return “application/x-anv”;
case “asa”:
return “text/asa”;
case “asf”:
return “video/x-ms-asf”;
case “asp”:
return “text/asp”;
case “asx”:
return “video/x-ms-asf”;
case “au”:
return “audio/basic”;
case “avi”:
return “video/avi”;
case “awf”:
return “application/vnd.adobe.workflow”;
case “biz”:
return “text/xml”;
case “bmp”:
return “application/x-bmp”;
case “bot”:
return “application/x-bot”;
case “c4t”:
return “application/x-c4t”;
case “c90”:
return “application/x-c90”;
case “cal”:
return “application/x-cals”;
case “cat”:
return “application/vnd.ms-pki.seccat”;
case “cdf”:
return “application/x-netcdf”;
case “cdr”:
return “application/x-cdr”;
case “cel”:
return “application/x-cel”;
case “cer”:
return “application/x-x509-ca-cert”;
case “cg4”:
return “application/x-g4”;
case “cgm”:
return “application/x-cgm”;
case “cit”:
return “application/x-cit”;
case “class”:
return “java/*”;
case “cml”:
return “text/xml:客户端浏览器按XML格式进行解析文档”;
case “cmp”:
return “application/x-cmp”;
case “cmx”:
return “application/x-cmx”;
case “cot”:
return “application/x-cot”;
case “crl”:
return “application/pkix-crl”;
case “crt”:
return “application/x-x509-ca-cert”;
case “csi”:
return “application/x-csi”;
case “css”:
return “text/css:客户端浏览器按CSS格式进行解析文档”;
case “cut”:
return “application/x-cut”;
case “dbf”:
return “application/x-dbf”;
case “dbm”:
return “application/x-dbm”;
case “dbx”:
return “application/x-dbx”;
case “dcd”:
return “text/xml:客户端浏览器按XML格式进行解析文档”;
case “dcx”:
return “application/x-dcx”;
case “der”:
return “application/x-x509-ca-cert”;
case “dgn”:
return “application/x-dgn”;
case “dib”:
return “application/x-dib”;
case “dll”:
return “application/x-msdownload”;
case “doc”:
return “application/msword”;
case “dot”:
return “application/msword”;
case “drw”:
return “application/x-drw”;
case “dtd”:
return “text/xml:客户端浏览器按XML格式进行解析文档”;
case “dwf”:
return “application/x-dwf”;
case “dwg”:
return “application/x-dwg”;
case “dxb”:
return “application/x-dxb”;
case “dxf”:
return “application/x-dxf”;
case “edn”:
return “application/vnd.adobe.edn”;
case “emf”:
return “application/x-emf”;
case “eml”:
return “message/rfc822”;
case “ent”:
return “text/xml:客户端浏览器按XML格式进行解析文档”;
case “epi”:
return “application/x-epi”;
case “eps”:
return “application/postscript”;
case “etd”:
return “application/x-ebx”;
case “exe”:
return “application/x-msdownload”;
case “fax”:
return “image/fax”;
case “fdf”:
return “application/vnd.fdf”;
case “fif”:
return “application/fractals”;
case “fo”:
return “text/xml:客户端浏览器按XML格式进行解析文档”;
case “frm”:
return “application/x-frm”;
case “g4”:
return “application/x-g4”;
case “gbr”:
return “application/x-gbr”;
case “gcd”:
return “application/x-gcd”;
case “gif”:
return “image/gif”;
case “gl2”:
return “application/x-gl2”;
case “gp4”:
return “application/x-gp4”;
case “hgl”:
return “application/x-hgl”;
case “hmr”:
return “application/x-hmr”;
case “hpg”:
return “application/x-hpgl”;
case “hpl”:
return “application/x-hpl”;
case “hqx”:
return “application/mac-binhex40”;
case “hrf”:
return “application/x-hrf”;
case “hta”:
return “application/hta”;
case “htc”:
return “text/x-component”;
case “htm”:
return “text/html:客户端浏览器按超文本格式进行解析文档”;
case “html”:
return “text/html:客户端浏览器按超文本格式进行解析文档”;
case “htt”:
return “text/webviewhtml”;
case “htx”:
return “text/html:客户端浏览器按超文本格式进行解析文档”;
case “icb”:
return “application/x-icb”;
case “ico”:
return “image/x-icon”;
case “iff”:
return “application/x-iff”;
case “ig4”:
return “application/x-g4”;
case “igs”:
return “application/x-igs”;
case “iii”:
return “application/x-iphone”;
case “img”:
return “application/x-img”;
case “ins”:
return “application/x-internet-signup”;
case “isp”:
return “application/x-internet-signup”;
case “IVF”:
return “video/x-ivf”;
case “java”:
return “java/*”;
case “jfif”:
return “image/jpeg”;
case “jpe”:
return “image/jpeg”;
case “jpeg”:
return “image/jpeg”;
case “jpg”:
return “image/jpeg”;
case “js”:
return “application/x-javascript”;
case “jsp”:
return “text/html:客户端浏览器按超文本格式进行解析文档”;
case “la1”:
return “audio/x-liquid-file”;
case “lar”:
return “application/x-laplayer-reg”;
case “latex”:
return “application/x-latex”;
case “lavs”:
return “audio/x-liquid-secure”;
case “lbm”:
return “application/x-lbm”;
case “lmsff”:
return “audio/x-la-lms”;
case “ls”:
return “application/x-javascript”;
case “ltr”:
return “application/x-ltr”;
case “m1v”:
return “video/x-mpeg”;
case “m2v”:
return “video/x-mpeg”;
case “m3u”:
return “audio/mpegurl”;
case “m4e”:
return “video/mpeg4”;
case “mac”:
return “application/x-mac”;
case “man”:
return “application/x-troff-man”;
case “math”:
return “text/xml”;
case “mdb”:
return “application/x-mdb”;
case “mfp”:
return “application/x-shockwave-flash”;
case “mht”:
return “message/rfc822”;
case “mhtml”:
return “message/rfc822”;
case “mi”:
return “application/x-mi”;
case “mid”:
return “audio/mid”;
case “midi”:
return “audio/mid”;
case “mil”:
return “application/x-mil”;
case “mml”:
return “text/xml”;
case “mnd”:
return “audio/x-musicnet-download”;
case “mns”:
return “audio/x-musicnet-stream”;
case “mocha”:
return “application/x-javascript”;
case “movie”:
return “video/x-sgi-movie”;
case “mp1”:
return “audio/mp1”;
case “mp2”:
return “audio/mp2”;
case “mp2v”:
return “video/mpeg”;
case “mp3”:
return “audio/mp3”;
case “mp4”:
return “video/mpeg4”;
case “mpa”:
return “video/x-mpg”;
case “mpd”:
return “application/vnd.ms-project”;
case “mpe”:
return “video/x-mpeg”;
case “mpeg”:
return “video/mpg”;
case “mpg”:
return “video/mpg”;
case “mpga”:
return “audio/rn-mpeg”;
case “mpp”:
return “application/vnd.ms-project”;
case “mps”:
return “video/x-mpeg”;
case “mpt”:
return “application/vnd.ms-project”;
case “mpv”:
return “video/mpg”;
case “mpv2”:
return “video/mpeg”;
case “mpw”:
return “application/vnd.ms-project”;
case “mpx”:
return “application/vnd.ms-project”;
case “mtx”:
return “text/xml”;
case “mxp”:
return “application/x-mmxp”;
case “net”:
return “image/pnetvue”;
case “nrf”:
return “application/x-nrf”;
case “nws”:
return “message/rfc822”;
case “odc”:
return “text/x-ms-odc”;
case “out”:
return “application/x-out”;
case “p10”:
return “application/pkcs10”;
case “p12”:
return “application/x-pkcs12”;
case “p7b”:
return “application/x-pkcs7-certificates”;
case “p7c”:
return “application/pkcs7-mime”;
case “p7m”:
return “application/pkcs7-mime”;
case “p7r”:
return “application/x-pkcs7-certreqresp”;
case “p7s”:
return “application/pkcs7-signature”;
case “pc5”:
return “application/x-pc5”;
case “pci”:
return “application/x-pci”;
case “pcl”:
return “application/x-pcl”;
case “pcx”:
return “application/x-pcx”;
case “pdf”:
return “application/pdf”;
case “pdx”:
return “application/vnd.adobe.pdx”;
case “pfx”:
return “application/x-pkcs12”;
case “pgl”:
return “application/x-pgl”;
case “pic”:
return “application/x-pic”;
case “pko”:
return “application/vnd.ms-pki.pko”;
case “pl”:
return “application/x-perl”;
case “plg”:
return “text/html”;
case “pls”:
return “audio/scpls”;
case “plt”:
return “application/x-plt”;
case “png”:
return “image/png”;
case “pot”:
return “application/vnd.ms-powerpoint”;
case “ppa”:
return “application/vnd.ms-powerpoint”;
case “ppm”:
return “application/x-ppm”;
case “pps”:
return “application/vnd.ms-powerpoint”;
case “ppt”:
return “application/x-ppt”;
case “pr”:
return “application/x-pr”;
case “prf”:
return “application/pics-rules”;
case “prn”:
return “application/x-prn”;
case “prt”:
return “application/x-prt”;
case “ps”:
return “application/x-ps”;
case “ptn”:
return “application/x-ptn”;
case “pwz”:
return “application/vnd.ms-powerpoint”;
case “r3t”:
return “text/vnd.rn-realtext3d”;
case “ra”:
return “audio/vnd.rn-realaudio”;
case “ram”:
return “audio/x-pn-realaudio”;
case “ras”:
return “application/x-ras”;
case “rat”:
return “application/rat-file”;
case “rdf”:
return “text/xml”;
case “rec”:
return “application/vnd.rn-recording”;
case “red”:
return “application/x-red”;
case “rgb”:
return “application/x-rgb”;
case “rjs”:
return “application/vnd.rn-realsystem-rjs”;
case “rjt”:
return “application/vnd.rn-realsystem-rjt”;
case “rlc”:
return “application/x-rlc”;
case “rle”:
return “application/x-rle”;
case “rm”:
return “application/vnd.rn-realmedia”;
case “rmf”:
return “application/vnd.adobe.rmf”;
case “rmi”:
return “audio/mid”;
case “rmj”:
return “application/vnd.rn-realsystem-rmj”;
case “rmm”:
return “audio/x-pn-realaudio”;
case “rmp”:
return “application/vnd.rn-rn_music_package”;
case “rms”:
return “application/vnd.rn-realmedia-secure”;
case “rmvb”:
return “application/vnd.rn-realmedia-vbr”;
case “rmx”:
return “application/vnd.rn-realsystem-rmx”;
case “rnx”:
return “application/vnd.rn-realplayer”;
case “rp”:
return “image/vnd.rn-realpix”;
case “rpm”:
return “audio/x-pn-realaudio-plugin”;
case “rsml”:
return “application/vnd.rn-rsml”;
case “rt”:
return “text/vnd.rn-realtext”;
case “rtf”:
return “application/x-rtf”;
case “rv”:
return “video/vnd.rn-realvideo”;
case “sam”:
return “application/x-sam”;
case “sat”:
return “application/x-sat”;
case “sdp”:
return “application/sdp”;
case “sdw”:
return “application/x-sdw”;
case “sit”:
return “application/x-stuffit”;
case “slb”:
return “application/x-slb”;
case “sld”:
return “application/x-sld”;
case “slk”:
return “drawing/x-slk”;
case “smi”:
return “application/smil”;
case “smil”:
return “application/smil”;
case “smk”:
return “application/x-smk”;
case “snd”:
return “audio/basic”;
case “sol”:
return “text/plain”;
case “sor”:
return “text/plain”;
case “spc”:
return “application/x-pkcs7-certificates”;
case “spl”:
return “application/futuresplash”;
case “spp”:
return “text/xml”;
case “ssm”:
return “application/streamingmedia”;
case “sst”:
return “application/vnd.ms-pki.certstore”;
case “stl”:
return “application/vnd.ms-pki.stl”;
case “stm”:
return “text/html”;
case “sty”:
return “application/x-sty”;
case “svg”:
return “text/xml”;
case “swf”:
return “application/x-shockwave-flash:客户端浏览器按Flash格式进行解析文档”;
case “tdf”:
return “application/x-tdf”;
case “tg4”:
return “application/x-tg4”;
case “tga”:
return “application/x-tga”;
case “tif”:
return “image/tiff”;
case “tiff”:
return “image/tiff”;
case “tld”:
return “text/xml”;
case “top”:
return “drawing/x-top”;
case “torrent”:
return “application/x-bittorrent”;
case “tsd”:
return “text/xml”;
case “txt”:
return “text/plain:客户端浏览器按纯文本格式进行解析文档”;
case “uin”:
return “application/x-icq”;
case “uls”:
return “text/iuls”;
case “vcf”:
return “text/x-vcard”;
case “vda”:
return “application/x-vda”;
case “vdx”:
return “application/vnd.visio”;
case “vml”:
return “text/xml”;
case “vpg”:
return “application/x-vpeg005”;
case “vsd”:
return “application/x-vsd”;
case “vss”:
return “application/vnd.visio”;
case “vst”:
return “application/x-vst”;
case “vsw”:
return “application/vnd.visio”;
case “vsx”:
return “application/vnd.visio”;
case “vtx”:
return “application/vnd.visio”;
case “vxml”:
return “text/xml”;
case “wav”:
return “audio/wav”;
case “wax”:
return “audio/x-ms-wax”;
case “wb1”:
return “application/x-wb1”;
case “wb2”:
return “application/x-wb2”;
case “wb3”:
return “application/x-wb3”;
case “wbmp”:
return “image/vnd.wap.wbmp”;
case “wiz”:
return “application/msword”;
case “wk3”:
return “application/x-wk3”;
case “wk4”:
return “application/x-wk4”;
case “wkq”:
return “application/x-wkq”;
case “wks”:
return “application/x-wks”;
case “wm”:
return “video/x-ms-wm”;
case “wma”:
return “audio/x-ms-wma”;
case “wmd”:
return “application/x-ms-wmd”;
case “wmf”:
return “application/x-wmf”;
case “wml”:
return “text/vnd.wap.wml”;
case “wmv”:
return “video/x-ms-wmv”;
case “wmx”:
return “video/x-ms-wmx”;
case “wmz”:
return “application/x-ms-wmz”;
case “wp6”:
return “application/x-wp6”;
case “wpd”:
return “application/x-wpd”;
case “wpg”:
return “application/x-wpg”;
case “wpl”:
return “application/vnd.ms-wpl”;
case “wq1”:
return “application/x-wq1”;
case “wr1”:
return “application/x-wr1”;
case “wri”:
return “application/x-wri”;
case “wrk”:
return “application/x-wrk”;
case “ws”:
return “application/x-ws”;
case “ws2”:
return “application/x-ws”;
case “wsc”:
return “text/scriptlet”;
case “wsdl”:
return “text/xml”;
case “wvx”:
return “video/x-ms-wvx”;
case “xdp”:
return “application/vnd.adobe.xdp”;
case “xdr”:
return “text/xml”;
case “xfd”:
return “application/vnd.adobe.xfd”;
case “xfdf”:
return “application/vnd.adobe.xfdf”;
case “xhtml”:
return “text/html”;
case “xls”:
return “application/x-xls”;
case “xlw”:
return “application/x-xlw”;
case “xml”:
return “text/xml”;
case “xpl”:
return “audio/scpls”;
case “xq”:
return “text/xml”;
case “xql”:
return “text/xml”;
case “xquery”:
return “text/xml”;
case “xsd”:
return “text/xml”;
case “xsl”:
return “text/xml”;
case “xslt”:
return “text/xml”;
case “xwd”:
return “application/x-xwd”;
case “x_b”:
return “application/x-x_b”;
case “x_t”:
return “application/x-x_t”;
default:
return “application/octet-stream”;
}
}
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/161622.html原文链接:https://javaforall.cn