Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    private static String[] _permittedSuffix = { ".mp4", ".wmv", ".avi", ".rmvb", ".mkv", ".flv", ".mov", ".ts" };

    protected static boolean checkFileSuffix(String filePath) {
        for (int i = 0; i < _permittedSuffix.length; i++) {
            String lowerCase = filePath.toLowerCase();
            if (lowerCase.endsWith(_permittedSuffix[i])) {
                return true;
            }
        }
        return false;
    }
}