类 ConfigHelper
- java.lang.Object
-
- org.hibernate.internal.util.ConfigHelper
-
@Deprecated public final class ConfigHelper extends Object
已过时。UseClassLoaderServiceinsteadA simple class to centralize logic needed to locate config files on the system.- 作者:
- Steve Ebersole
-
-
方法概要
所有方法 静态方法 具体方法 已过时的方法 修饰符和类型 方法 说明 static URLfindAsResource(String path)已过时。Try to locate a local URL representing the incoming path.static InputStreamgetConfigStream(String path)已过时。Open an InputStream to the URL represented by the incoming path.static InputStreamgetResourceAsStream(String resource)已过时。static InputStreamgetUserResourceAsStream(String resource)已过时。static URLlocateConfig(String path)已过时。Try to locate a local URL representing the incoming path.
-
-
-
方法详细资料
-
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 tolocateConfig(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)
已过时。
-
-