Class ConfigHelper


  • @Deprecated
    public final class ConfigHelper
    extends Object
    Deprecated.
    Use ClassLoaderService instead
    A simple class to centralize logic needed to locate config files on the system.
    • Method Detail

      • locateConfig

        public static URL locateConfig​(String path)
        Deprecated.
        Try to locate a local URL representing the incoming path. The first attempt assumes that the incoming path is an actual URL string (file://, etc). If this does not work, then the next attempts try to locate this URL as a java system resource.
        Parameters:
        path - The path representing the config location.
        Returns:
        An appropriate URL or null.
      • findAsResource

        public static URL findAsResource​(String path)
        Deprecated.
        Try to locate a local URL representing the incoming path. This method only attempts to locate this URL as a java system resource.
        Parameters:
        path - The path representing the config location.
        Returns:
        An appropriate URL or null.
      • getConfigStream

        public static InputStream getConfigStream​(String path)
                                           throws HibernateException
        Deprecated.
        Open an InputStream to the URL represented by the incoming path. First makes a call to locateConfig(String) in order to find an appropriate URL. URL.openStream() is then called to obtain the stream.
        Parameters:
        path - The path representing the config location.
        Returns:
        An input stream to the requested config resource.
        Throws:
        HibernateException - Unable to open stream to that resource.
      • getResourceAsStream

        public static InputStream getResourceAsStream​(String resource)
        Deprecated.
      • getUserResourceAsStream

        public static InputStream getUserResourceAsStream​(String resource)
        Deprecated.