开发学院手机开发Android 开发 Android 中文件类型与MIME的匹配表 阅读

Android 中文件类型与MIME的匹配表

 2010-09-16 23:48:00 来源:WEB开发网   
核心提示:intent.setDataAndType(/*uri*/Uri.fromFile(file), type);//跳转startActivity(intent);}现在就差一个MIME类型和文件类型的匹配表了,--- 我是背景分割线 --"文件类型——MIME类型"的匹配表://建立一个MIME类型

intent.setDataAndType(/*uri*/Uri.fromFile(file), type);

//跳转

startActivity(intent);

}

现在就差一个MIME类型和文件类型的匹配表了。

------------------------------- 我是背景分割线 ------------------------------------------

"文件类型——MIME类型"的匹配表:

//建立一个MIME类型与文件后缀名的匹配表

private final String[][] MIME_MapTable={

//{后缀名, MIME类型}

{".3gp", "video/3gpp"},

{".apk", "application/vnd.android.package-archive"},

{".asf", "video/x-ms-asf"},

{".avi", "video/x-msvideo"},

{".bin", "application/octet-stream"},

{".bmp", "image/bmp"},

{".c", "text/plain"},

{".class", "application/octet-stream"},

{".conf", "text/plain"},

{".cpp", "text/plain"},

{".doc", "application/msword"},

{".exe", "application/octet-stream"},

{".gif", "image/gif"},

{".gtar", "application/x-gtar"},

{".gz", "application/x-gzip"},

{".h", "text/plain"},

{".htm", "text/html"},

{".html", "text/html"},

{".jar", "application/java-archive"},

{".java", "text/plain"},

{".jpeg", "image/jpeg"},

{".jpg", "image/jpeg"},

{".js", "application/x-javascript"},

{".log", "text/plain"},

{".m3u", "audio/x-mpegurl"},

{".m4a", "audio/mp4a-latm"},

{".m4b", "audio/mp4a-latm"},

{".m4p", "audio/mp4a-latm"},

{".m4u", "video/vnd.mpegurl"},

{".m4v", "video/x-m4v"},

{".mov", "video/quicktime"},

{".mp2", "audio/x-mpeg"},

{".mp3", "audio/x-mpeg"},

{".mp4", "video/mp4"},

{".mpc", "application/vnd.mpohun.certificate"},

{".mpe", "video/mpeg"},

{".mpeg", "video/mpeg"},

{".mpg", "video/mpeg"},

Tags:Android 文件 类型

编辑录入:coldstar [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
赞助商链接