Java tutorial
//package com.java2s; import android.text.TextUtils; public class Main { public static boolean isImage(String type) { if (TextUtils.isEmpty(type)) { return false; } type = type.toLowerCase(); if ((type.equals("jpg") || type.equals("gif") || type.equals("png") || type.equals("jpeg") || type.equals("bmp") || type.equals("wbmp") || type.equals("ico") || type.equals("jpe"))) { return true; } return false; } }