code: public static String enforceSafeFilename(final String filename)
  	{
  		final char safeChar = '.';
  
  		char[] chars = filename.toCharArray();
  
  		for (int i = 0; i < chars.length; i++)
  		{
  			if (!isSafeFilenameCharacter(chars[i]))
  				chars[i] = safeChar;
  		}
  
  		return String.valueOf(chars);
  	}
docs: Ensures that a file is "safe" (this is done by whitelisting a small number of characters)<br />
  This method is mainly designed for producing a filename which bears some resemblance to a user-supplied String while
  removing the risk of being tricked
  
  @param filename
  
  @return