/** * return the content-type from a file name. If none is found returning * application/octet-stream<br/> * For a text-based content-type, also return the encoding suffix eg. * <em>"text/plain; charset=utf-8"</em> * * @param filename * the file name * @return the content-type deduced from the file extension. */ public String getContentType(Context context, String filename) { return getContentType(context, filename, "application/octet-stream"); }
String mimeType = mimeTypes.getContentType(context, url.getFile());