com.atlassian.jira.web.util
Class FileNameCharacterCheckerUtil

java.lang.Object
  extended bycom.atlassian.jira.web.util.FileNameCharacterCheckerUtil

public class FileNameCharacterCheckerUtil
extends Object

This is a centralized object for checking illegal characters in attachment file names. This is used by the AttachmentManager and the Screenshot Applet.


Field Summary
static char[] INVALID_CHARS
           
 
Constructor Summary
FileNameCharacterCheckerUtil()
           
 
Method Summary
 String assertFileNameDoesNotContainInvalidChars(String filename)
          This will test the given filename string for any invalid characters.
 String getPrintableInvalidCharacters()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INVALID_CHARS

public static final char[] INVALID_CHARS
Constructor Detail

FileNameCharacterCheckerUtil

public FileNameCharacterCheckerUtil()
Method Detail

assertFileNameDoesNotContainInvalidChars

public String assertFileNameDoesNotContainInvalidChars(String filename)
This will test the given filename string for any invalid characters. If it contains an invalid character then the string returned will be the character. A return value of null means that the string is a valid filename.

Parameters:
filename - the filename to be checked.
Returns:
null if the filename is valid, else the character that is invalid.

getPrintableInvalidCharacters

public String getPrintableInvalidCharacters()


Copyright © 2002-2006 Atlassian. All Rights Reserved.