Java tutorial
//package com.java2s; //License from project: LGPL import java.util.Arrays; import java.util.List; public class Main { private static final List<String> DATABASE_EXTENSIONS = Arrays .asList(("accdb,db,dbf,mdb,pdb,sql,adp,cdb,dsn,fmp12,fp7,frm,mdf," + "mwb,ora,pdb,qvd,sqlite,sqlitedb,te,tps,$er,4dd,accdc,accde,accdr,accdt,accft,adb,ade," + "adf,alf,ask,cdb,cdb,ckp,cpd,daconnections,dacpac,daschema,db,db3,dbc,dbs,dbt,dbv,dcb," + "dcx,ddl,dp1,dtsx,dxl,eco,ecx,edb,fdb,fic,fmpsl,fpt,gdb,gwi,hdb,ib,idb,ihx,itdb,itw," + "kdb,kexi,lgc,maq,marshal,mav,mpd,myd,ndf,nrmlib,nsf,nv2,nyf,odb,oqy,p96,p97,pan,pdm," + "pnz,qry,rsd,scx,sdb,sdb,sdb,sdf,sis,spq,sqlite3,trc,udb,udl,usr,vis,wdb,xdb,4dl," + "abcddb,abs,abx,accdw,adb,adn,btr,cat,cma,dad,dadiagrams,db-shm,db-wal,dbx,dct,dqy,dsk," + "fp5,gdb,his,jtx,kexic,kexis,maf,mar,mas,maw,mdt,mrg,mud,ns3,ns4,nv,odb,orx,owc,rbf,rod," + "rpd,sbf,sdb,teacher,tmd,trc,trm,vpd,wmdb,wrk,^^^,db2,fcd,fm5,fmp,fol,fp3,fp4,mdbhtml," + "mdn,ns2,rctd,v12,xld").split(",")); private static boolean isDb(String ext) { for (String s : DATABASE_EXTENSIONS) { if (s.equalsIgnoreCase(ext)) return true; } return false; } }