ResourceUtils (Apache Log4j 1.2.17 API)
Date: 2012-05-06

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.log4j.lf5.util
Class ResourceUtils

    java.lang.Object
      org.apache.log4j.lf5.util.ResourceUtils

    public class ResourceUtils

extends Object

ResourceUtils. Provide a set of convenience methods for working with Resources.

Author:
  Michael J. Sikorsky, Robert Shaw
See Also:
  `Resource`

Constructor Summary
`ResourceUtils()`

Method Summary
`static InputStream` | `getResourceAsStream(Object object, Resource resource)` Get the InputStream for this resource.
`static URL` | `getResourceAsURL(Object object, Resource resource)` Get the URL for this resource.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ResourceUtils

    public ResourceUtils()

Method Detail

### getResourceAsStream

    public static InputStream getResourceAsStream(Object object,
                                                  Resource resource)

  Get the InputStream for this resource. Note: to convert an InputStream into an InputReader, use: new InputStreamReader(InputStream).

  Parameters:
    `object` - The object to grab the Classloader from. This parameter is quite important from a visibility of resources standpoint as the hierarchy of Classloaders plays a role.
    `resource` - The resource to load.
  Returns:
    If the Resource was found, the InputStream, otherwise null.
  See Also:
    `Resource`, `getResourceAsURL(Object,Resource)`, `InputStream`

### getResourceAsURL

    public static URL getResourceAsURL(Object object,
                                       Resource resource)

  Get the URL for this resource.

  Parameters:
    `object` - The object to grab the Classloader from. This parameter is quite important from a visibility of resources standpoint as the hierarchy of Classloaders plays a role.
    `resource` - The resource to load.
  Returns:
    If the Resource was found, the URL, otherwise null.
  See Also:
    `Resource`, `getResourceAsStream(Object,Resource)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2012 Apache Software Foundation. All Rights Reserved.