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();
}