code: public static UserPreferences load(final FileObject userPreferencesFile, final boolean loadDatabaseDrivers) {
          try {
              if (userPreferencesFile == null || !userPreferencesFile.exists()) {
                  logger.info("User preferences file does not exist");
                  return new UserPreferencesImpl(userPreferencesFile);
              }
          } catch (final FileSystemException e) {
              logger.debug("Could not determine if file exists: {}", userPreferencesFile);
          }
  
          ChangeAwareObjectInputStream inputStream = null;
          try {
              inputStream = new ChangeAwareObjectInputStream(userPreferencesFile.getContent().getInputStream());
              inputStream.addRenamedClass("org.datacleaner.user.UserPreferences", UserPreferencesImpl.class);
              final UserPreferencesImpl result = (UserPreferencesImpl) inputStream.readObject();
  
              if (loadDatabaseDrivers) {
                  final List<UserDatabaseDriver> installedDatabaseDrivers = result.getDatabaseDrivers();
                  for (final UserDatabaseDriver userDatabaseDriver : installedDatabaseDrivers) {
                      try {
                          userDatabaseDriver.loadDriver();
                      } catch (final IllegalStateException e) {
                          logger.error("Could not load database driver", e);
                      }
                  }
              }
  
              result._userPreferencesFile = userPreferencesFile;
              result.refreshProxySettings();
              return result;
          } catch (final InvalidClassException e) {
              logger.warn("User preferences file version does not match application version: {}", e.getMessage());
              return new UserPreferencesImpl(userPreferencesFile);
          } catch (final Exception e) {
              logger.warn("Could not read user preferences file", e);
              return new UserPreferencesImpl(userPreferencesFile);
          } finally {
              FileHelper.safeClose(inputStream);
          }
      }
docs: Loads a user preferences file and initializes a
  {@link UserPreferencesImpl} object using it.
  
  @param userPreferencesFile
  @param loadDatabaseDrivers
  @return