Loads an externally defined configuration and/or a configuration include
@param source The existing configuration items
961122
protected void loadExternalConfigs(final Set<ConfigurationItem> source) {
    ConfigurationItem include = getConfigurationItemByKey(source, "tsd.core.config");
    if(include!=null && include.getValue()!=null) {
      loadConfigSource(this, include.getValue());
    }
    include = getConfigurationItemByKey(source, "tsd.core.config.include");
    if(include!=null && include.getValue()!=null) {
      loadConfigSource(this, include.getValue());
    }   
  }
663333
protected void loadConfig(final String file) throws FileNotFoundException,
      IOException {
    final FileInputStream file_stream = new FileInputStream(file);
    try {
      final Properties props = new Properties();
      props.load(file_stream);

      // load the hash map
      loadHashMap(props);

      // no exceptions thrown, so save the valid path and exit
      LOG.info("Successfully loaded configuration file: " + file);
      config_location = file;
    } finally {
      file_stream.close();
    }
  }
1251108
public static Serializable loadConfig (InputStream source)
        throws IOException
    {
        try {
            ObjectInputStream oin = new ObjectInputStream(source);
            return (Serializable)oin.readObject();
        } catch (ClassNotFoundException cnfe) {
            String errmsg = "Unknown config class";
            throw (IOException) new IOException(errmsg).initCause(cnfe);
        }
    }
727379
void loadConfigs() throws IOException {

        application.loadConfig();
        user.loadConfig();
        system.loadConfig();

        config = application.getConfig().withFallback(user.getConfig()).withFallback(system.getConfig());
        dump2debugLog("MERGED", config);
    }
867427
@Override
  public Configuration loadConfig() throws ConfigurationException, IOException {

    Configuration resultConfig = new Configuration();

    if (!Utils.localFileExists(this.getConfigFileName())) {
      // String configFileName = System.getenv(ConfigConstant.DDF_INI_ENV_VAR.getValue());
      File file = new File(this.locateConfigFileName(this.getConfigDir(), this.getConfigFileName()));
      mConfigDir = file.getParentFile().getName();
      mConfigFileName = file.getCanonicalPath();
    }

    if (!Utils.localFileExists(this.getConfigFileName())) return null;

    HierarchicalINIConfiguration config = new HierarchicalINIConfiguration(this.getConfigFileName());

    @SuppressWarnings("unchecked")
    Set<String> sectionNames = config.getSections();
    for (String sectionName : sectionNames) {
      SubnodeConfiguration section = config.getSection(sectionName);
      if (section != null) {
        Configuration.Section resultSection = resultConfig.getSection(sectionName);

        @SuppressWarnings("unchecked")
        Iterator<String> keys = section.getKeys();
        while (keys.hasNext()) {
          String key = keys.next();
          String value = section.getString(key);
          if (value != null) {
            resultSection.set(key, value);
          }
        }
      }
    }

    mConfig = resultConfig;
    return mConfig;
  }
1174727
@Override
    public void include(Readable in, String source) throws IOException
    {
        if (cursor != end)
        {
            release();
        }
        if (includeStack == null)
        {
            includeStack = new ArrayDeque<>();
        }
        includeStack.push(includeLevel);
        includeLevel = new IncludeLevel(in, source);
    }
971179
@Override
    public @Nonnull ApplicationContextBuilder include(@Nullable String... configurations) {
        if (configurations != null) {
            this.configurationIncludes.addAll(Arrays.asList(configurations));
        }
        return this;
    }
273165
public void load(InputStream in) {
    try {
      PropertiesConfiguration config = new PropertiesConfiguration();
      // disabled to prevent accumulo classpath value from being shortened
      config.setDelimiterParsingDisabled(true);
      config.load(in);
      ((CompositeConfiguration) internalConfig).addConfiguration(config);
    } catch (ConfigurationException e) {
      throw new IllegalArgumentException(e);
    }
  }
1255656
public void copy(ConnectionContext source) {
        this.connection = source.connection;
        this.session = source.session;
        this.destination = source.destination;
    }
1108889
protected function load($source)
    {
        $reader = new FileReader($source);

        $dictionary = new MimeTypeDictionary($reader);

        foreach ($dictionary as $entry) {
            $this->dict += array_fill_keys(
                $entry->fileExtensions,
                $entry->mimeType
            );
        }
    }
664753
public void configSourceLoaded(Object source) {
        Properties props = ConfigurationConverter.getProperties(ConfigurationManager.getConfigInstance());
        reconfigure(props);
    }
8660
private void includeConfigurationInternal(final Configuration conf) {

		if (conf == null) {
			LOG.error("Given configuration object is null, ignoring it...");
			return;
		}

		synchronized (this.confData) {

			final Iterator<String> it = conf.keySet().iterator();

			while (it.hasNext()) {

				final String key = it.next();
				this.confData.put(key, conf.getString(key, ""));
			}
		}
	}
1319858
public void add( NameSource source ) {
        /*
            Unimplemented -
            Need to add an inner class util here that holds the source and
            monitors it by registering a listener
        */
        if ( sources == null )
            sources = new ArrayList();

        sources.add( source );
    }
550826
@SneakyThrows
   public static void loadConfig(Resource resource) {
      if (resource == null || !resource.exists()) {
         return;
      }
      if (resource.path() != null && getInstance().loaded.contains(resource.path())) {
         return; //Only load once!
      }
      new ConfigParser(resource).parse();
      if (resource.path() != null) {
         getInstance().loaded.add(resource.path());
      }
   }
1206238
public Config load() {

        ConfigResolveOptions resolveOptions = getResolveOptions();
        HashMapBindings bindings = this.bindings;
        Config config = emptyConfig();

        for (int i = 0; i < 2; i++) {

            config = emptyConfig();

            for (ConfigSource source
                    : sources.fromHighestToLowestPrecedence()) {

                config = config.withFallback(source.load(bindings));
            }

            config = config.resolve(resolveOptions);
            bindings = bindings.set(Config.class, config);
        }

        return config;
    }
230171
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, ClassNotFoundException
    {
        setContextPath((String)in.readObject());
        setVirtualHosts((String[])in.readObject());
        Object o= in.readObject();

        while (o instanceof HttpHandler)
        {
            addHandler((HttpHandler)o);
            o= in.readObject();
        }
        setAttributes((Map)o);
        setRedirectNullPath(in.readBoolean());
        setMaxCachedFileSize(in.readInt());
        setMaxCacheSize(in.readInt());
        setStatsOn(in.readBoolean());
        setPermissions((PermissionCollection)in.readObject());
        setClassLoaderJava2Compliant(in.readBoolean());

        _defaultsDescriptor= (String)in.readObject();
        _war= (String)in.readObject();
        _extract= in.readBoolean();
        _ignorewebjetty= in.readBoolean();
        _distributable= in.readBoolean();
        _configurationClassNames=(String[])in.readObject();
    }
1347148
private static void loadConfig() throws FileNotFoundException, IOException {
        try (InputStream configStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(CONFIG_FILE)) {
            if (configStream == null) {
                throw new FileNotFoundException();
            }

            properties = new Properties();
            properties.load(configStream);
        }

        // Read properties
        accountId = properties.getProperty("customerAccountId");
        createS3Bucket = Boolean.valueOf(properties.getProperty("createS3Bucket"));
        s3RegionName = properties.getProperty("s3RegionName");
        s3BucketName = properties.getProperty("s3BucketName").trim();
        s3BucketARN = getBucketARN(s3BucketName);
        s3ObjectPrefix = properties.getProperty("s3ObjectPrefix").trim();

        String sizeInMBsProperty = properties.getProperty("destinationSizeInMBs");
        s3DestinationSizeInMBs = StringUtils.isNullOrEmpty(sizeInMBsProperty) ? null : Integer.parseInt(sizeInMBsProperty.trim());
        String intervalInSecondsProperty = properties.getProperty("destinationIntervalInSeconds");
        s3DestinationIntervalInSeconds = StringUtils.isNullOrEmpty(intervalInSecondsProperty) ? null : Integer.parseInt(intervalInSecondsProperty.trim());

        deliveryStreamName = properties.getProperty("deliveryStreamName");
        s3DestinationAWSKMSKeyId = properties.getProperty("destinationAWSKMSKeyId");
        firehoseRegion = properties.getProperty("firehoseRegion");
        iamRoleName = properties.getProperty("iamRoleName");
        iamRegion = properties.getProperty("iamRegion");

        // Update Delivery Stream Destination related properties
        enableUpdateDestination = Boolean.valueOf(properties.getProperty("updateDestination"));
        updateS3ObjectPrefix = properties.getProperty("updateS3ObjectPrefix").trim();
        String updateSizeInMBsProperty = properties.getProperty("updateSizeInMBs");
        updateSizeInMBs = StringUtils.isNullOrEmpty(updateSizeInMBsProperty) ? null : Integer.parseInt(updateSizeInMBsProperty.trim());
        String updateIntervalInSecondsProperty = properties.getProperty("updateIntervalInSeconds");
        updateIntervalInSeconds = StringUtils.isNullOrEmpty(updateIntervalInSecondsProperty) ? null : Integer.parseInt(updateIntervalInSecondsProperty.trim());
    }