}
@Override
public void validate(String filename) throws IllegalNameException {
if ((filename == null) || (filename.length() == 0)) {
throw new IllegalNameException("The name cannot be empty.");
}
if (containsIllegalCharacter(filename)) {
throw new IllegalNameException(null, filename, illegalCharacters.toString());
}
if (endsWithSeparator(filename)) {
throw new IllegalNameException("The file name may not end with the character '"
+ filename.charAt(filename.length() - 1) + "'.", filename);
}
}