public class

Resource

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

Class Overview

Resource encapsulates access to Resources via the Classloader.

Summary

Fields
protected String _name
Public Constructors
Resource()
Default, no argument constructor.
Resource(String name)
Construct a Resource given a name.
Public Methods
InputStream getInputStream()
Get the InputStream for this Resource.
InputStreamReader getInputStreamReader()
Get the InputStreamReader for this Resource.
String getName()
Get the name of the resource.
URL getURL()
Get the URL of the Resource.
void setName(String name)
Set the name of the resource.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected String _name

Public Constructors

public Resource ()

Default, no argument constructor.

public Resource (String name)

Construct a Resource given a name.

See Also

Public Methods

public InputStream getInputStream ()

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

public InputStreamReader getInputStreamReader ()

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

public String getName ()

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

See Also

public URL getURL ()

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

See Also

public void setName (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