Java tutorial
//package com.java2s; import java.io.File; import java.util.Locale; public class Main { public static boolean isSupportedMultipleFormat(File file) { return isSupportedMultipleFormat(file.getName()); } public static boolean isSupportedMultipleFormat(String file) { return isASFFile(file); } public static boolean isASFFile(File f) { return isASFFile(f.getName()); } public static boolean isASFFile(String in) { in = in.toLowerCase(Locale.US); return in.endsWith(".asf") || in.endsWith(".wm"); } }