private static boolean isSubFormat(String filename){
  for (  String ext : SUB_EXTENSIONS) {
    if (filename.contains("." + ext)) {
      return true;
    }
  }
  return false;
}

private static boolean isSubFormat ( String filename ) { for ( String ext : SUB_EXTENSIONS ) { if ( filename . contains ( "." + ext ) ) { return true ; } } return false ; }
test if file is subtitle format
