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 Resource

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

    public class Resource

extends java.lang.Object

Resource encapsulates access to Resources via the Classloader.

Author:
  Michael J. Sikorsky, Robert Shaw

Field Summary
`protected java.lang.String` | `_name`

Constructor Summary
`Resource()` Default, no argument constructor.
`Resource(java.lang.String name)` Construct a Resource given a name.

Method Summary
`java.io.InputStream` | `getInputStream()` Get the InputStream for this Resource.
`java.io.InputStreamReader` | `getInputStreamReader()` Get the InputStreamReader for this Resource.
`java.lang.String` | `getName()` Get the name of the resource.
`java.net.URL` | `getURL()` Get the URL of the Resource.
`void` | `setName(java.lang.String name)` Set the name of the resource.

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

Field Detail

### _name

    protected java.lang.String _name

Constructor Detail

### Resource

    public Resource()

  Default, no argument constructor.

### Resource

    public Resource(java.lang.String name)

  Construct a Resource given a name.

  See Also:
    `setName(String)`

Method Detail

### setName

    public void setName(java.lang.String name)

  Set the name of the resource.

  A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code.

  The name of a resource is a "/"-separated path name that identifies the resource.

  See Also:
    `getName()`

### getName

    public java.lang.String getName()

  Get the name of the resource. Set setName() for a description of a resource.

  See Also:
    `setName(java.lang.String)`

### getInputStream

    public java.io.InputStream getInputStream()

  Get the InputStream for this Resource. Uses the classloader from this Resource.

  See Also:
    `getInputStreamReader()`, `ResourceUtils`

### getInputStreamReader

    public java.io.InputStreamReader getInputStreamReader()

  Get the InputStreamReader for this Resource. Uses the classloader from this Resource.

  See Also:
    `getInputStream()`, `ResourceUtils`

### getURL

    public java.net.URL getURL()

  Get the URL of the Resource. Uses the classloader from this Resource.

  See Also:
    `ResourceUtils`

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-2007 Apache Software Foundation. All Rights Reserved.