org.mortbay.resource
Class JarFileResource
java.lang.Object
org.mortbay.resource.Resource
org.mortbay.resource.URLResource
org.mortbay.resource.JarResource
org.mortbay.resource.JarFileResource
- All Implemented Interfaces:
- Serializable
class JarFileResource
- extends JarResource
Method Summary |
protected boolean |
checkConnection()
|
String |
encode(String uri)
Encode according to this resource type. |
boolean |
exists()
Returns true if the respresenetd resource exists. |
boolean |
isDirectory()
Returns true if the respresenetd resource is a container/directory. |
long |
lastModified()
Returns the last modified time |
long |
length()
Return the length of the resource |
String[] |
list()
Returns a list of resource names contained in the given resource |
protected void |
newConnection()
|
void |
release()
Release any resources held by the resource. |
_jarFile
transient JarFile _jarFile
_file
transient File _file
_list
transient String[] _list
_entry
transient JarEntry _entry
_directory
transient boolean _directory
_jarUrl
transient String _jarUrl
_path
transient String _path
_exists
transient boolean _exists
JarFileResource
JarFileResource(URL url)
release
public void release()
- Description copied from class:
URLResource
- Release any resources held by the resource.
- Overrides:
release
in class JarResource
checkConnection
protected boolean checkConnection()
- Overrides:
checkConnection
in class JarResource
newConnection
protected void newConnection()
throws IOException
- Overrides:
newConnection
in class JarResource
- Throws:
IOException
exists
public boolean exists()
- Returns true if the respresenetd resource exists.
- Overrides:
exists
in class JarResource
isDirectory
public boolean isDirectory()
- Returns true if the respresenetd resource is a container/directory.
If the resource is not a file, resources ending with "/" are
considered directories.
- Overrides:
isDirectory
in class URLResource
lastModified
public long lastModified()
- Returns the last modified time
- Overrides:
lastModified
in class URLResource
list
public String[] list()
- Description copied from class:
URLResource
- Returns a list of resource names contained in the given resource
- Overrides:
list
in class URLResource
length
public long length()
- Return the length of the resource
- Overrides:
length
in class URLResource
encode
public String encode(String uri)
- Encode according to this resource type.
File URIs are not encoded.
- Overrides:
encode
in class Resource
- Parameters:
uri
- URI to encode.
- Returns:
- The uri unchanged.