Jan 25, 2013

Get extension and MIME type of file using MimeTypeMap

Example to get extension and MIME type of file using MimeTypeMap.

 String extension = MimeTypeMap.getFileExtensionFromUrl(fileUrl);
 String mimetype = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);


No comments:

Post a Comment

Infolinks In Text Ads