docs: public static String replaceRestrictedCharactersInFileName(String name) {
          int replacedChars = 0;
          StringBuilder sb = new StringBuilder(name.length());
          for (int x = 0; x < name.length(); x++) {
              char y = name.charAt(x);
              if ((FILE_NAME_RESTRICTED_CHARS.indexOf(y) == -1) &&
                  ((y < 0) || (y > 31))) /* Exclude control characters */ {
                  sb.append(y);
              } else {
                  sb.append('.');
                  replacedChars++;
              }
          }
  
          String processedName = sb.toString();
          if ((processedName.length() <= 2) && (replacedChars > 0) &&
              (processedName.equals(".") || processedName.equals(".."))) {
              return null;
          }
  
          return ((name.length() - replacedChars) > 0) ? processedName : null;
      }