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> WEB_EXTENSIONS = Arrays
            .asList(("asp,aspx,cer,cfm,csr,htm,html,jsp,rss,xhtml,a5w,alx,asax,"
                    + "asmx,atom,att,axd,chm,crt,cshtml,dwt,fcgi,htaccess,jlp,jsf,jso,jspx,zb,opml,p12,pac,"
                    + "qbo,spc,ucf,webarchive,wgt,wml,wsdl,xfdl,xhtm,a4p,adr,aex,a,ap,appcache,aro,asa,ascx,"
                    + "ashx,asr,awm,bml,bok,browser,btapp,cha,chat,codasite,co,crl,dap,dcr,der,dhtml,disco,"
                    + "discomap,dll,do,dowload,edge,epibrw,esproj,ewp,fwp,ge,gsp,htx,hxs,hype,idc,iwdgt,jhtml,"
                    + "jws,kit,lasso,lbc,less,maff,mht,mhtml,mspx,muse,mvc,od,oam,obml,ogc,olp,oth,p7b,p7c,pem,"
                    + "pro,psp,pub,qf,rflw,rhtml,rjs,rt,rwp,rwsw,saveddeck,scss,shtm,shtml,sitemap,sites,sites2,"
                    + "srf,stc,suck,swz,tvpi,tvvi,url,vbd,vbhtml,vdw,vrml,vsdisco,wdgt,web,webbookmark,"
                    + "webhistory,webloc,website,whtt,woa,wpp,wrf,xbel,xht,xpd,xul,zfo,zhtml,zhtml,zul,zvz,"
                    + "ccbjs,cfml,cpg,dbm,dml,ece,fmp,hdml,htc,iqy,itms,itpc,jcz,jspa,jss,jst,mapx,master,"
                    + "xg,p7,page,phtml,prf,ptw,qrm,rw3,rwtheme,seam,sht,site,ssp,stm,stp,svc,svr,uhtml,wbs,"
                    + "wbxml,webarchivexml,wgp,widget,w,wpx,xbl,xss,xws,bwp,cdf,cms,compressed,csp,dochtml,"
                    + "docmhtml,dothtml,hdm,jvs,map,moz,mvr,phtm,ppthtml,pptmhtml,sdb,stl,stml,vlp,vrt")
                            .split(","));

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