public final class ConfigHelper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.net.URL |
findAsResource(java.lang.String path)
Try to locate a local URL representing the incoming path.
|
static java.util.Properties |
getConfigProperties(java.lang.String path)
Loads a properties instance based on the data at the incoming config location.
|
static java.io.InputStream |
getConfigStream(java.lang.String path)
Open an InputStream to the URL represented by the incoming path.
|
static java.io.Reader |
getConfigStreamReader(java.lang.String path)
Open an Reader to the URL represented by the incoming path.
|
static java.io.InputStream |
getResourceAsStream(java.lang.String resource) |
static java.io.InputStream |
getUserResourceAsStream(java.lang.String resource) |
static java.net.URL |
locateConfig(java.lang.String path)
Try to locate a local URL representing the incoming path.
|
public static final java.net.URL locateConfig(java.lang.String path)
path - The path representing the config location.public static final java.net.URL findAsResource(java.lang.String path)
path - The path representing the config location.public static final java.io.InputStream getConfigStream(java.lang.String path)
throws HibernateException
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.HibernateException - Unable to open stream to that resource.public static final java.io.Reader getConfigStreamReader(java.lang.String path)
throws HibernateException
locateConfig(java.lang.String) in order to find an appropriate URL.
URL.openStream() is then called to obtain a stream, which is then
wrapped in a Reader.path - The path representing the config location.HibernateException - Unable to open reader to that resource.public static final java.util.Properties getConfigProperties(java.lang.String path)
throws HibernateException
path - The path representing the config location.HibernateException - Unable to load properties from that resource.public static java.io.InputStream getResourceAsStream(java.lang.String resource)
public static java.io.InputStream getUserResourceAsStream(java.lang.String resource)
Copyright © 2013. All Rights Reserved.