类 ConfigHelper


  • @Deprecated
    public final class ConfigHelper
    extends Object
    已过时。
    Use ClassLoaderService instead
    A simple class to centralize logic needed to locate config files on the system.
    作者:
    Steve Ebersole
    • 方法详细资料

      • locateConfig

        public static URL locateConfig​(String path)
        已过时。
        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.
        参数:
        path - The path representing the config location.
        返回:
        An appropriate URL or null.
      • findAsResource

        public static URL findAsResource​(String path)
        已过时。
        Try to locate a local URL representing the incoming path. This method only attempts to locate this URL as a java system resource.
        参数:
        path - The path representing the config location.
        返回:
        An appropriate URL or null.
      • getConfigStream

        public static InputStream getConfigStream​(String path)
                                           throws HibernateException
        已过时。
        Open an InputStream to the URL represented by the incoming path. First makes a call to locateConfig(java.lang.String) in order to find an appropriate URL. URL.openStream() is then called to obtain the stream.
        参数:
        path - The path representing the config location.
        返回:
        An input stream to the requested config resource.
        抛出:
        HibernateException - Unable to open stream to that resource.
      • getResourceAsStream

        public static InputStream getResourceAsStream​(String resource)
        已过时。
      • getUserResourceAsStream

        public static InputStream getUserResourceAsStream​(String resource)
        已过时。