1 23 package com.sun.enterprise.diagnostics.util; 24 25 import java.io.File ; 26 27 import java.io.FilenameFilter ; 28 import java.io.File ; 29 import java.io.FileReader ; 30 import java.io.BufferedReader ; 31 import java.io.FileNotFoundException ; 32 import java.io.IOException ; 33 34 import com.sun.enterprise.diagnostics.Constants; 35 import com.sun.enterprise.diagnostics.DiagnosticException; 36 41 public class DDFilter implements FilenameFilter { 42 43 private static final String ejb_jar = "ejb-jar.xml"; 44 private static final String sun_ejb_jar = "sun-ejb-jar.xml"; 45 private static final String web = "web.xml"; 46 private static final String sun_web = "sun-web.xml"; 47 private static final String application = "application.xml"; 48 private static final String sun_application = "sun-application.xml"; 49 private static final String META_INF = "META-INF"; 50 private static final String WEB_INF = "WEB-INF"; 51 52 public boolean accept (File aDir, String fileName) { 53 54 if (fileName.matches(ejb_jar) || 55 fileName.matches(sun_ejb_jar) || 56 fileName.matches(web) || 57 fileName.matches(sun_web)|| 58 fileName.matches(application) || 59 fileName.matches(sun_application)) { 60 return true; 61 } 62 else 63 return false; 64 } 65 } | Popular Tags |