Android examples for android.webkit:MimeTypeMap
get Mime Type Of InputStream
import java.io.InputStream; import android.graphics.BitmapFactory; public class Main { public static String getMimeTypeOfInputStream(InputStream stream) { BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true;/*from w w w . ja v a 2 s . co m*/ BitmapFactory.decodeStream(stream, null, options); return options.outMimeType; } }