Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: LGPL 

import java.util.Arrays;

import java.util.List;

public class Main {
    private static final List<String> VIDEO_EXTENSIONS = Arrays
            .asList(("3g2,3gp,asf,asx,avi,flv,m4v,mov,mp4,mpg,rm,srt,swf,vob,"
                    + "wmv,aepx,ale,avp,avs,bdm,bik,bin,bsf,camproj,cpi,dash,divx,dmsm,dream,dvdmedia,dvr-ms,"
                    + "dzm,dzp,edl,f4v,fbr,fcproject,hdmov,imovieproj,ism,ismv,m2p,mkv,mod,moi,mpeg,mts,mxf,"
                    + "ogv,otrkey,pds,prproj,psh,r3d,rcproject,rmvb,scm,smil,snagproj,sqz,stx,swi,tix,trp,ts,"
                    + "veg,vf,vro,webm,wlmp,wtv,xvid,yuv,3gp2,3gpp,3p2,890,aaf,aec,aep,aetx,ajp,amc,amv,amx,"
                    + "arcut,arf,avb,avchd,avv,axm,bdmv,bdt3,bmc,bmk,camrec,ced,cine,cip,clpi,cmmp,cmmtpl,"
                    + "cmproj,cmrec,cst,d2v,d3v,dat,dce,dck,dcr,dcr,dir,dmsd,dmsd3d,dmss,dmx,dpa,dpg,dv-avi,"
                    + "dvr,dvx,dxr,dzt,evo,eye,ezt,f4p,fbz,fcp,flc,flh,fli,fpdx,ftc,gcs,gfp,gts,hdv,hkm,ifo,"
                    + "imovieproject,ircp,ismc,ivr,izz,izzy,jss,jts,jtv,kdenlive,lrv,m1pg,m21,m21,m2t,m2ts,"
                    + "m2v,mani,mgv,mj2,mjp,mk3d,mnv,mp21,mp21,mpgindex,mpl,mpls,mproj,mpv,mqv,msdvd,mse,"
                    + "mswmm,mtv,mvd,mve,mvp,mvp,mvy,mxv,ncor,nsv,nuv,nvc,ogm,ogx,pac,pgi,photoshow,piv,plproj,"
                    + "pmf,ppj,prel,pro,prtl,pxv,qtl,qtz,rcd,rdb,rec,rmd,rmp,rms,roq,rsx,rum,rv,rvid,rvl,sbk,"
                    + "scc,screenflow,sdv,sedprj,seq,sfvidcap,siv,smi,smi,smk,stl,svi,swt,tda3mt,thp,tivo,"
                    + "tod,tp,tp0,tpd,tpr,trec,tsp,ttxt,tvlayer,tvs,tvshow,usf,usm,vbc,vc1,vcpf,vcv,vdo,vdr,"
                    + "vep,vfz,vgz,viewlet,vlab,vp6,vp7,vpj,vsp,wcp,wmd,wmmp,wmx,wp3,wpl,wve,wvx,xej,xel,xesc,"
                    + "xfl,xlmv,y4m,zm1,zm2,zm3,zmv,264,3gpp2,3mm,60d,aet,avc,avd,avs,awlive,bdt2,bnp,box,bs4,"
                    + "bu,bvr,byu,camv,clk,cx3,dav,ddat,dif,dlx,dmb,dmsm3d,dnc,dv4,f4f,fbr,ffd,flx,gvp,h264,"
                    + "inp,int,irf,iva,ivf,jmv,k3g,ktn,lrec,lsx,lvix,m1v,m2a,m4u,meta,mjpg,modd,moff,moov,"
                    + "movie,mp2v,mp4,infovid,mp4v,mpe,mpl,mpsub,mvc,mvex,mys,osp,par,playlist,"
                    + "pns,pro4dvd,pro5dvd,proqc,pssd,pva,pvr,qt,qtch,qtindex,qtm,rp,rts,sbt,scn,sfd,sml,smv,"
                    + "spl,str,tdt,tid,tvrecording,vcr,vem,vft,vfw,vid,video,vix,vs4,vse,w32,wm,wot,xmv,yog,"
                    + "787,am,anim,aqt,bix,cel,cvc,db2,dsy,gl,gom,grasp,gvi,ismclip,ivs,kmv,lsf,m15,m4e,m75,"
                    + "mmv,mob,mpeg1,mpeg4,mpf,mpg2,mpv2,msh,mvb,nut,orv,pjs,pmv,psb,rmd,rmv,rts,scm,sec,ssf,"
                    + "ssm,tdx,vdx,viv,vivo,vp3,zeg").split(","));

    private static boolean isVideo(String ext) {
        for (String s : VIDEO_EXTENSIONS) {
            if (s.equalsIgnoreCase(ext))
                return true;
        }
        return false;
    }
}