Top Fields Constructors Methods
org.mortbay.resource

pack-priv Class JarFileResource

extends JarResource
Class Inheritance
Imports
java.io.File, .IOException, java.net.JarURLConnection, .URL, java.util.ArrayList, .Enumeration, java.util.jar.JarEntry, .JarFile, org.mortbay.log.Log

Field Summary

Modifier and TypeField and Description
pack-priv transient boolean
pack-priv transient JarEntry
pack-priv transient boolean
pack-priv transient File
pack-priv transient JarFile
pack-priv transient String
pack-priv transient String[]
pack-priv transient String
Inherited from org.mortbay.resource.JarResource:
_jarConnection

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
JarFileResource(URL url, boolean useCaches)

Method Summary

Modifier and TypeMethod and Description
protected boolean
public String

Returns:

The uri unchanged.
encode
(String
URI to encode.
uri
)

Overrides org.mortbay.resource.Resource.encode.

Encode according to this resource type.
public boolean
exists()

Overrides org.mortbay.resource.JarResource.exists.

Returns true if the respresenetd resource exists.
public static Resource
getNonCachingResource(Resource resource)

Take a Resource that possibly might use URLConnection caching and turn it into one that doesn't.

public boolean
isDirectory()

Overrides org.mortbay.resource.URLResource.isDirectory.

Returns true if the represented resource is a container/directory.
public long
lastModified()

Overrides org.mortbay.resource.URLResource.lastModified.

Returns the last modified time
public long
length()

Overrides org.mortbay.resource.URLResource.length.

Return the length of the resource
public synchronized String[]
list()

Overrides org.mortbay.resource.URLResource.list.

Returns a list of resource names contained in the given resource
protected void
public synchronized void
release()

Overrides org.mortbay.resource.JarResource.release.

Release any resources held by the resource.
Inherited from org.mortbay.resource.JarResource:
extractextractgetFilegetInputStream

Field Detail

_directoryback to summary
pack-priv transient boolean _directory
_entryback to summary
pack-priv transient JarEntry _entry
_existsback to summary
pack-priv transient boolean _exists
_fileback to summary
pack-priv transient File _file
_jarFileback to summary
pack-priv transient JarFile _jarFile
_jarUrlback to summary
pack-priv transient String _jarUrl
_listback to summary
pack-priv transient String[] _list
_pathback to summary
pack-priv transient String _path

Constructor Detail

JarFileResourceback to summary
pack-priv JarFileResource(URL url)
JarFileResourceback to summary
pack-priv JarFileResource(URL url, boolean useCaches)

Method Detail

checkConnectionback to summary
protected boolean checkConnection()

Overrides org.mortbay.resource.JarResource.checkConnection.

encodeback to summary
public String encode(String uri)

Overrides org.mortbay.resource.Resource.encode.

Encode according to this resource type. File URIs are not encoded.

Parameters
uri:String

URI to encode.

Returns:String

The uri unchanged.

existsback to summary
public boolean exists()

Overrides org.mortbay.resource.JarResource.exists.

Returns true if the respresenetd resource exists.

getNonCachingResourceback to summary
public static Resource getNonCachingResource(Resource resource)

Take a Resource that possibly might use URLConnection caching and turn it into one that doesn't.

isDirectoryback to summary
public boolean isDirectory()

Overrides org.mortbay.resource.URLResource.isDirectory.

Returns true if the represented resource is a container/directory. If the resource is not a file, resources ending with "/" are considered directories.

lastModifiedback to summary
public long lastModified()

Overrides org.mortbay.resource.URLResource.lastModified.

Returns the last modified time

lengthback to summary
public long length()

Overrides org.mortbay.resource.URLResource.length.

Return the length of the resource

listback to summary
public synchronized String[] list()

Overrides org.mortbay.resource.URLResource.list.

Doc from org.mortbay.resource.URLResource.list.

Returns a list of resource names contained in the given resource

newConnectionback to summary
protected void newConnection() throws IOException

Overrides org.mortbay.resource.JarResource.newConnection.

Exceptions
IOException:

Doc from org.mortbay.resource.JarResource.newConnection.

Sub-classes of JarResource may throw an IOException (or subclass)

releaseback to summary
public synchronized void release()

Overrides org.mortbay.resource.JarResource.release.

Doc from org.mortbay.resource.URLResource.release.

Release any resources held by the resource.