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();
}
获取文件mime_type类型
最新推荐文章于 2025-07-27 19:23:24 发布
