All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.soento.core.enums.Video Maven / Gradle / Ivy

package com.soento.core.enums;

/**
 * 视频类型
 *
 * @author soento
 */
public enum Video {
    /**
     * .mp4
     */
    MP4(".mp4"),
    /**
     * .flv
     */
    FLV(".flv"),
    /**
     * .swf
     */
    SWF(".swf"),
    /**
     * .mkv
     */
    MKV(".mkv"),
    /**
     * .avi
     */
    AVI(".avi"),
    /**
     * .rm
     */
    RM(".rm"),
    /**
     * .rmvb
     */
    RMVB(".rmvb"),
    /**
     * .mpeg
     */
    MPEG(".mpeg"),
    /**
     * .mpg
     */
    MPG(".mpg"),
    /**
     * .ogv
     */
    OGV(".ogv"),
    /**
     * .wmv
     */
    WMV(".wmv"),
    /**
     * .webm
     */
    WEBM(".webm");
    private final String value;

    private Video(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public static boolean has(String extension) {
        Video[] vs = Video.values();
        for (Video v : vs) {
            if (v.getValue().equalsIgnoreCase(extension)) {
                return true;
            }
        }
        return false;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy