Package org.hibernate.internal.util
Class ConfigHelper
- java.lang.Object
-
- org.hibernate.internal.util.ConfigHelper
-
@Deprecated public final class ConfigHelper extends Object
Deprecated.UseClassLoaderService
insteadA simple class to centralize logic needed to locate config files on the system.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static 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 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 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
public static InputStream getResourceAsStream(String resource)
Deprecated.
-
getUserResourceAsStream
public static InputStream getUserResourceAsStream(String resource)
Deprecated.
-
-