获取文件mime_type类型

来源:互联网 发布:node pdf导出 编辑:程序博客网 时间:2024/05/19 10:42
String rootPath = Environment.getExternalStorageDirectory().getAbsolutePath();File rootFile = new File(rootPath + "/init.txt");String mimeType = "";try {    mimeType = rootFile.toURI().toURL().openConnection().getContentType();} catch (IOException e) {    e.printStackTrace();}

0 0
原创粉丝点击