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> AUDIO_EXTENSIONS = Arrays
            .asList(("aif,iff,m3u,m4a,mid,mp3,mpa,ra,wav,wma,aa,aa3,acd,acd-zip,"
                    + "acm,afc,als,amr,amxd,amz,ape,at3,caf,cda,cpr,dcf,dmsa,dmse,dss,emp,emx,flac,ftm,gpx,logic,"
                    + "m3u8,m4b,m4r,midi,mod,mxl,nbs,nki,nra,ogg,omf,pcast,pls,ptf,ptx,ram,rns,rx2,seq,sesx,sib,"
                    + "slp,snd,trak,3ga,4mp,5xb,5xe,5xs,8svx,a2b,a2i,a2m,aac,aax,abc,abm,ac3,acd-bak,act,adg,adt,"
                    + "adts,agm,agr,aifc,aiff,akp,alc,amf,ams,ams,aob,apl,asd,au,aud,aup,band,bap,bdd,bidule,bnk,"
                    + "bun,bwf,bww,caff,cdda,cdlx,cdo,cdr,cel,cfa,cgrp,cidb,ckb,conform,copy,cpt,csh,cts,cwb,cwp,"
                    + "cwt,dcm,dct,dewf,df2,dfc,dig,dig,dls,dm,dmf,dra,drg,ds2,dsf,dsm,dtm,dts,dtshd,dvf,dwd,efa,"
                    + "efk,efq,efs,efv,emd,esps,f2r,f32,f3r,f4a,f64,fdp,fev,flp,fpa,frg,fsb,fsm,ftm,ftmx,fzf,fzv,"
                    + "g721,g723,g726,gbs,gig,gp5,gpbank,gpk,groove,gsf,gsflib,gsm,h4b,h5b,h5e,h5s,hbe,hsb,"
                    + "ics,igp,ins,isma,iti,k26,kar,kfn,koz,koz,krz,ksf,kt3,la,lso,lwv,m4p,ma1,mbr,mdc,med,"
                    + "mgv,minigsf,miniusf,mka,mmf,mmm,mmp,mmpz,mo3,mp2,mpc,mpdp,mpga,mscz,mte,mtf,mti,mtm,"
                    + "mtp,mts,mus,mus,musx,mux,mx5,mxmf,myr,narrative,ncw,nkb,nkc,nkm,nks,nkx,nml,nmsv,note,"
                    + "nrt,nsa,nsf,nst,ntn,nwc,obw,odm,oga,okt,oma,omg,omx,ots,ove,ovw,pandora,pca,pcg,peak,"
                    + "pek,pk,pkf,pla,ply,pna,psf,psm,ptm,pts,qcp,r1m,rax,rbs,rex,rfl,rgrp,rip,rmi,rmj,rmx,"
                    + "rng,rol,rsn,rso,rti,s3i,s3m,sap,sbi,sc2,scs11,sd,sd,sd2,sdat,sds,ses,sf2,sfk,sfl,sfpack,"
                    + "sgp,shn,slx,sma,smf,smp,smpx,snd,sng,sou,sppack,sprg,sseq,stap,stm,stx,sty,svd,swa,"
                    + "sxt,syh,syn,syw,syx,tak,td0,tg,tta,txw,u,uax,ult,uni,usf,usflib,ust,uw,uwf,vag,vap,"
                    + "vc3,vlc,vmd,vmo,voc,vox,voxal,vpl,vpm,vpw,vqf,vrf,vsq,vyf,w01,w64,wave,wax,wfb,wfd,"
                    + "wfm,wfp,wow,wpk,wpp,wproj,wrk,wus,wut,wv,wvc,wve,wwu,xa,xfs,xm,xmu,xrns,xspf,yookoo,"
                    + "zpl,zvd,669,a2p,a2t,a2w,ab,acp,adv,ahx,aimppl,ais,alaw,all,apf,aria,ariax,ase,au,"
                    + "avastsounds,awb,ay,b4s,bmml,brstm,bwg,c01,ckf,cmf,dff,djr,dmc,ds,dw,efe,emy,eop,erb,"
                    + "expressionmap,far,fls,gbproj,h0,h3b,h3e,h4e,hbb,hbs,hdp,hma,hps,iaa,igr,imp,ins,it,"
                    + "itls,its,jam,jam,kit,kmp,kpl,ksc,ksd,kt2,l,lof,lqt,lvp,m,m1a,m2,mdl,minipsf,minipsf2,"
                    + "mlp,mmp,mogg,mp1,mpu,mp_,mscx,msv,mt2,mu3,mui,mus,mux,mx3,mx4,mx5template,mzp,npl,nvf,"
                    + "ofr,opus,ovw,pac,pbf,pcm,pho,phy,pjunoxl,plst,pno,ppc,ppcx,prg,psf1,psf2,psy,ptcop,"
                    + "pvc,q1,q2,rad,raw,rbs,rcy,rmm,rsf,rta,rts,rvx,s3z,saf,sbg,sbk,sd2f,sdt,sfap0,sfs,sid,"
                    + "smp,snd,sng,sns,sph,spx,sseq,ssnd,sty,svx,tak,thx,toc,tsp,ub,ulaw,v2m,vb,vdj,vgm,vgz,"
                    + "vmf,vmf,vtx,wav,wem,wtpl,wtpt,xa,xbmml,xmf,xmi,xmz,xpf,xsb,xsp,xwb,zpa,2sf,2sflib,6cm,"
                    + "8cm,8med,a52,al,alac,atrac,avr,bcs,bonk,box,cfxr,d00,d01,ddt,dsp,dwa,ear,evr,fda,fff,"
                    + "fzb,gio,gio,gm,gro,gsm,hmi,imf,ins,jo,jo-7z,k25,kin,ksm,ktp,mini2sf,minincsf,mt9,musa,"
                    + "muz,mwand,mws,nap,orc,pat,pd,pmpl,prg,r,record,rmf,rtm,sam,sb,sdii,sdx,seg,sf,snsf,sth,"
                    + "sti,stw,sw,swav,syn,tfmx,tm2,tm8,tmc,tun,u8,ulw,val,voi,wand,wyz,xi,xp,xt,ym,zab," + "zvr")
                            .split(","));

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