Package org.hibernate.internal.util
Class ConfigHelper
java.lang.Object
org.hibernate.internal.util.ConfigHelper
Deprecated.
A simple class to centralize logic needed to locate config files on the system.
-
Method Summary
Modifier and TypeMethodDescriptionstatic URL
findAsResource
(String path) Deprecated.Try to locate a local URL representing the incoming path.static InputStream
getConfigStream
(String path) Deprecated.Open an InputStream to the URL represented by the incoming path.static InputStream
getResourceAsStream
(String resource) Deprecated.static InputStream
getUserResourceAsStream
(String resource) Deprecated.static URL
locateConfig
(String path) Deprecated.Try to locate a local URL representing the incoming path.
-
Method Details
-
locateConfig
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
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
Deprecated.Open an InputStream to the URL represented by the incoming path. First makes a call tolocateConfig(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
Deprecated. -
getUserResourceAsStream
Deprecated.
-
ClassLoaderService
instead