|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibatis.common.resources.Resources
A class to simplify access to resources through the classloader.
Constructor Summary | |
Resources()
|
Method Summary | |
static java.io.File |
getResourceAsFile(java.lang.ClassLoader loader,
java.lang.String resource)
Returns a resource on the classpath as a File object |
static java.io.File |
getResourceAsFile(java.lang.String resource)
Returns a resource on the classpath as a File object |
static java.util.Properties |
getResourceAsProperties(java.lang.ClassLoader loader,
java.lang.String resource)
Returns a resource on the classpath as a Properties object |
static java.util.Properties |
getResourceAsProperties(java.lang.String resource)
Returns a resource on the classpath as a Properties object |
static java.io.Reader |
getResourceAsReader(java.lang.ClassLoader loader,
java.lang.String resource)
Returns a resource on the classpath as a Reader object |
static java.io.Reader |
getResourceAsReader(java.lang.String resource)
Returns a resource on the classpath as a Reader object |
static java.io.InputStream |
getResourceAsStream(java.lang.ClassLoader loader,
java.lang.String resource)
Returns a resource on the classpath as a Stream object |
static java.io.InputStream |
getResourceAsStream(java.lang.String resource)
Returns a resource on the classpath as a Stream object |
static java.net.URL |
getResourceURL(java.lang.ClassLoader loader,
java.lang.String resource)
Returns the URL of the resource on the classpath |
static java.net.URL |
getResourceURL(java.lang.String resource)
Returns the URL of the resource on the classpath |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Resources()
Method Detail |
public static java.net.URL getResourceURL(java.lang.String resource) throws java.io.IOException
resource
- The resource to find
java.io.IOException
- If the resource cannot be found or readpublic static java.net.URL getResourceURL(java.lang.ClassLoader loader, java.lang.String resource) throws java.io.IOException
loader
- The classloader used to load the resourceresource
- The resource to find
java.io.IOException
- If the resource cannot be found or readpublic static java.io.InputStream getResourceAsStream(java.lang.String resource) throws java.io.IOException
resource
- The resource to find
java.io.IOException
- If the resource cannot be found or readpublic static java.io.InputStream getResourceAsStream(java.lang.ClassLoader loader, java.lang.String resource) throws java.io.IOException
loader
- The classloader used to load the resourceresource
- The resource to find
java.io.IOException
- If the resource cannot be found or readpublic static java.util.Properties getResourceAsProperties(java.lang.String resource) throws java.io.IOException
resource
- The resource to find
java.io.IOException
- If the resource cannot be found or readpublic static java.util.Properties getResourceAsProperties(java.lang.ClassLoader loader, java.lang.String resource) throws java.io.IOException
loader
- The classloader used to load the resourceresource
- The resource to find
java.io.IOException
- If the resource cannot be found or readpublic static java.io.Reader getResourceAsReader(java.lang.String resource) throws java.io.IOException
resource
- The resource to find
java.io.IOException
- If the resource cannot be found or readpublic static java.io.Reader getResourceAsReader(java.lang.ClassLoader loader, java.lang.String resource) throws java.io.IOException
loader
- The classloader used to load the resourceresource
- The resource to find
java.io.IOException
- If the resource cannot be found or readpublic static java.io.File getResourceAsFile(java.lang.String resource) throws java.io.IOException
resource
- The resource to find
java.io.IOException
- If the resource cannot be found or readpublic static java.io.File getResourceAsFile(java.lang.ClassLoader loader, java.lang.String resource) throws java.io.IOException
loader
- The classloader used to load the resourceresource
- The resource to find
java.io.IOException
- If the resource cannot be found or read
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |