org.apache.tomcat.util.file

## Class ConfigFileLoader

- java.lang.Object
- - org.apache.tomcat.util.file.ConfigFileLoader

-     public class ConfigFileLoader
      extends Object

  This class is used to obtain `InputStream`s for configuration files from a given location String. This allows greater flexibility than these files having to be loaded directly from a file system.

- - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static InputStream` | `getInputStream(String location)` Deprecated.
    `static ConfigurationSource` | `getSource()`
    `static URI` | `getURI(String location)` Deprecated.
    `static void` | `setSource(ConfigurationSource source)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getSource

          public static final ConfigurationSource getSource()

    - #### setSource

          public static final void setSource(ConfigurationSource source)

    - #### getInputStream

          @Deprecated
          public static InputStream getInputStream(String location)
                                                        throws IOException

      Deprecated.
      Load the resource from the specified location.
      Parameters:
        `location` - The location for the resource of interest. The location may be a URL or a file path. Relative paths will be resolved against CATALINA_BASE.
      Returns:
        The InputStream for the given resource. The caller is responsible for closing this stream when it is no longer used.
      Throws:
        `IOException` - If an InputStream cannot be created using the provided location

    - #### getURI

          @Deprecated
          public static URI getURI(String location)

      Deprecated.

Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.