SingleIOFilenameFilter.java
资源名称:WorkFlow.rar [点击查看]
上传用户:ahit0551
上传日期:2009-04-15
资源大小:2345k
文件大小:1k
源码类别:
xml/soap/webservice
开发平台:
Java
- package name.xio.util;
- import java.io.File;
- import java.io.FilenameFilter;
- public class SingleIOFilenameFilter implements FilenameFilter {
- public SingleIOFilenameFilter(String extend) {
- this.extend = extend;
- }
- public boolean accept(File dir, String name) {
- int index = name.lastIndexOf(PathUtil.SEPARATOR_FORMAT);
- if ((index > 0) && (index < (name.length() - 1))) {
- String extension = name.substring(index + 1).toLowerCase();
- if (extension.equalsIgnoreCase(extend)) {
- return true;
- }
- }
- return false;
- }
- private String extend;
- }