code: public static String getSafeFileName(String orig)
    {
      if (orig != null)
      {
        return orig.replaceAll("[^0-9A-Za-z-]", "_");
      }
      else
      {
        return UUID.randomUUID().toString();
      }
    }
docs: Returns a file name that is safe to use and does not have any invalid
  characters.
  
  @param orig
  @return