jbackup/src/main/java/org/jbundle/jbackup/util/FileExtensionFilter.java
public boolean accept(File pathname)
	{
		String name = pathname.getName();
		int iLastDot = name.lastIndexOf('.');
		String strExtension = "";
		if ((iLastDot != -1)
			&& (iLastDot != name.length() -1 ))
				strExtension = name.substring(iLastDot + 1);
		if (m_rgstrIncludeExtensions != null)
		{
			for (int i = 0; i < m_rgstrIncludeExtensions.length; i++)
			{
				if (m_rgstrIncludeExtensions[i].equalsIgnoreCase(strExtension))
					return true;	// Accept
			}
			return false;	// Not in included - return
		}
		if (m_rgstrExcludeExtensions != null)
		{
			for (int i = 0; i < m_rgstrExcludeExtensions.length; i++)
			{
				if (m_rgstrExcludeExtensions[i].equalsIgnoreCase(strExtension))
					return false;	// Don't accept
			}
		}
		return true;	// Accept this file
	}
public boolean accept(File pathname)
	{
		String name = pathname.getName();
		int iLastDot = name.lastIndexOf('.');
		String strExtension = "";
		if ((iLastDot != -1)
			&& (iLastDot != name.length() -1 ))
				strExtension = name.substring(iLastDot + 1);
		if (m_rgstrIncludeExtensions != null)
		{
			for (int i = 0; i < m_rgstrIncludeExtensions.length; i++)
			{
				if (m_rgstrIncludeExtensions[i].equalsIgnoreCase(strExtension))
					return true;	// Accept
			}
			return false;	// Not in included - return
		}
		if (m_rgstrExcludeExtensions != null)
		{
			for (int i = 0; i < m_rgstrExcludeExtensions.length; i++)
			{
				if (m_rgstrExcludeExtensions[i].equalsIgnoreCase(strExtension))
					return false;	// Don't accept
			}
		}
		return true;	// Accept this file
	}
Tests whether or not the specified abstract pathname should be
included in a pathname list.

@param  pathname  The abstract pathname to be tested
@return  <code>true</code> if and only if <code>pathname</code>
should be included