is jpeg or jpg Image Extension - Android android.graphics

Android examples for android.graphics:JPEG

Description

is jpeg or jpg Image Extension

Demo Code

public class Main{


    public static boolean isImageExtension(String extension) {
        String[] valid = { ".jpg", ".jpeg" };
        for (String ex : valid) {
            if (extension.equalsIgnoreCase(ex)) {
                return true;
            }//  w w w . j a  v  a2 s .  c  om
        }
        return false;
    }

}

Related Tutorials