public class Resource
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
protected java.lang.String |
_name |
构造器和说明 |
---|
Resource()
Default, no argument constructor.
|
Resource(java.lang.String name)
Construct a Resource given a name.
|
限定符和类型 | 方法和说明 |
---|---|
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.
|
public Resource()
public Resource(java.lang.String name)
setName(String)
public void setName(java.lang.String name)
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.
getName()
public java.lang.String getName()
public java.io.InputStream getInputStream()
public java.io.InputStreamReader getInputStreamReader()
public java.net.URL getURL()
ResourceUtils