code: public static String addFileExtension(
        String fileName, VectorGraphicsFormat vectorGraphicsFormat) {
  
      String fileNameWithFileExtension = fileName;
      final String newFileExtension = "." + vectorGraphicsFormat.toString().toLowerCase();
      if (fileName.length() <= newFileExtension.length()
          || !fileName
              .substring(fileName.length() - newFileExtension.length(), fileName.length())
              .equalsIgnoreCase(newFileExtension)) {
        fileNameWithFileExtension = fileName + newFileExtension;
      }
      return fileNameWithFileExtension;
    }
docs: Only adds the extension of the VectorGraphicsFormat to the filename if the filename doesn't
  already have it.
  
  @param fileName
  @param vectorGraphicsFormat
  @return filename (if extension already exists), otherwise;: filename + "." + extension