| |
|
| java.lang.Object com.ibatis.common.resources.Resources
Resources | public class Resources extends Object (Code) | | A class to simplify access to resources through the classloader.
|
getDefaultClassLoader | public static ClassLoader getDefaultClassLoader()(Code) | | Returns the default classloader (may be null).
The default classloader |
getResourceAsFile | public static File getResourceAsFile(String resource) throws IOException(Code) | | Returns a resource on the classpath as a File object
Parameters: resource - The resource to find The resource throws: IOException - If the resource cannot be found or read |
getResourceAsFile | public static File getResourceAsFile(ClassLoader loader, String resource) throws IOException(Code) | | Returns a resource on the classpath as a File object
Parameters: loader - - the classloader used to load the resource Parameters: resource - - the resource to find The resource throws: IOException - If the resource cannot be found or read |
getResourceAsProperties | public static Properties getResourceAsProperties(String resource) throws IOException(Code) | | Returns a resource on the classpath as a Properties object
Parameters: resource - The resource to find The resource throws: IOException - If the resource cannot be found or read |
getResourceAsProperties | public static Properties getResourceAsProperties(ClassLoader loader, String resource) throws IOException(Code) | | Returns a resource on the classpath as a Properties object
Parameters: loader - The classloader used to load the resource Parameters: resource - The resource to find The resource throws: IOException - If the resource cannot be found or read |
getResourceAsReader | public static Reader getResourceAsReader(String resource) throws IOException(Code) | | Returns a resource on the classpath as a Reader object
Parameters: resource - The resource to find The resource throws: IOException - If the resource cannot be found or read |
getResourceAsReader | public static Reader getResourceAsReader(ClassLoader loader, String resource) throws IOException(Code) | | Returns a resource on the classpath as a Reader object
Parameters: loader - The classloader used to load the resource Parameters: resource - The resource to find The resource throws: IOException - If the resource cannot be found or read |
getResourceAsStream | public static InputStream getResourceAsStream(String resource) throws IOException(Code) | | Returns a resource on the classpath as a Stream object
Parameters: resource - The resource to find The resource throws: IOException - If the resource cannot be found or read |
getResourceAsStream | public static InputStream getResourceAsStream(ClassLoader loader, String resource) throws IOException(Code) | | Returns a resource on the classpath as a Stream object
Parameters: loader - The classloader used to load the resource Parameters: resource - The resource to find The resource throws: IOException - If the resource cannot be found or read |
getResourceURL | public static URL getResourceURL(String resource) throws IOException(Code) | | Returns the URL of the resource on the classpath
Parameters: resource - The resource to find The resource throws: IOException - If the resource cannot be found or read |
getResourceURL | public static URL getResourceURL(ClassLoader loader, String resource) throws IOException(Code) | | Returns the URL of the resource on the classpath
Parameters: loader - The classloader used to load the resource Parameters: resource - The resource to find The resource throws: IOException - If the resource cannot be found or read |
getUrlAsProperties | public static Properties getUrlAsProperties(String urlString) throws IOException(Code) | | Gets a URL as a Properties object
Parameters: urlString - - the URL to get A Properties object with the data from the URL throws: IOException - If the resource cannot be found or read |
getUrlAsReader | public static Reader getUrlAsReader(String urlString) throws IOException(Code) | | Gets a URL as a Reader
Parameters: urlString - - the URL to get A Reader with the data from the URL throws: IOException - If the resource cannot be found or read |
getUrlAsStream | public static InputStream getUrlAsStream(String urlString) throws IOException(Code) | | Gets a URL as an input stream
Parameters: urlString - - the URL to get An input stream with the data from the URL throws: IOException - If the resource cannot be found or read |
setCharset | public static void setCharset(Charset charset)(Code) | | Use this method to set the Charset to be used when
calling the getResourceAsReader methods. This will
allow iBATIS to function properly when the system default
encoding doesn't deal well with unicode (IBATIS-340, IBATIS-349)
Parameters: charset - |
setDefaultClassLoader | public static void setDefaultClassLoader(ClassLoader defaultClassLoader)(Code) | | Sets the default classloader
Parameters: defaultClassLoader - - the new default ClassLoader |
|
|
|