⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filenamewildcardfilter.java

📁 提供ESB 应用mule源代码 提供ESB 应用mule源代码
💻 JAVA
字号:
/* * $Id: FilenameWildcardFilter.java 10489 2008-01-23 17:53:38Z dfeist $ * -------------------------------------------------------------------------------------- * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com * * The software in this package is published under the terms of the CPAL v1.0 * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */package org.mule.transport.file.filters;import org.mule.api.MuleMessage;import org.mule.routing.filters.WildcardFilter;import org.mule.transport.file.FileConnector;import java.io.File;import java.io.FilenameFilter;/** * <code>FilenameWildcardFilter</code> filters incoming files from a directory, * based on file patterns. */public class FilenameWildcardFilter extends WildcardFilter implements FilenameFilter{    public FilenameWildcardFilter()    {        super();    }    public FilenameWildcardFilter(String pattern)    {        super(pattern);    }    /**     * Filter condition decider method. <p/> Returns     * <code>boolean</code> <code>TRUE</code> if the file conforms to an     * acceptable pattern or <code>FALSE</code> otherwise.     *      * @param dir The directory to apply the filter to.     * @param name The name of the file to apply the filter to.     * @return indication of acceptance as boolean.     */    public boolean accept(File dir, String name)    {        if (name == null)        {            logger.warn("The filename and/or directory was null");            return false;        }        else        {            return accept(name);        }    }    public boolean accept(MuleMessage message)    {        return accept(message.getProperty(FileConnector.PROPERTY_ORIGINAL_FILENAME));    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -