Top Fields Constructors Methods
org.mortbay.resource

public Class JarResource

extends URLResource
Class Inheritance
Known Direct Subclasses
org.mortbay.resource.JarFileResource
Imports
java.io.File, .FileOutputStream, .FilterInputStream, .IOException, .InputStream, java.net.JarURLConnection, .URL, java.util.jar.JarEntry, .JarInputStream, org.mortbay.log.Log, org.mortbay.util.IO

Field Summary

Modifier and TypeField and Description
protected transient JarURLConnection
Inherited from org.mortbay.resource.URLResource:
_connection_in_url_urlString_useCaches

Constructor Summary

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

Method Summary

Modifier and TypeMethod and Description
protected boolean
public boolean
exists()

Overrides org.mortbay.resource.URLResource.exists.

Returns true if the respresenetd resource exists.
public static void
extract(Resource resource, File directory, boolean deleteOnExit)

public void
extract(File directory, boolean deleteOnExit)

public File
getFile()

Overrides org.mortbay.resource.URLResource.getFile.

Returns an File representing the given resource or NULL if this is not possible.
public InputStream
getInputStream()

Overrides org.mortbay.resource.URLResource.getInputStream.

Returns an input stream to the resource
protected void
public synchronized void
release()

Overrides org.mortbay.resource.URLResource.release.

Release any resources held by the resource.
Inherited from org.mortbay.resource.URLResource:
addPathdeleteequalsgetNamegetOutputStreamgetURLgetUseCacheshashCodeisDirectorylastModifiedlengthlistrenameTotoString

Field Detail

_jarConnectionback to summary
protected transient JarURLConnection _jarConnection

Constructor Detail

JarResourceback to summary
pack-priv JarResource(URL url)
JarResourceback to summary
pack-priv JarResource(URL url, boolean useCaches)

Method Detail

checkConnectionback to summary
protected boolean checkConnection()

Overrides org.mortbay.resource.URLResource.checkConnection.

existsback to summary
public boolean exists()

Overrides org.mortbay.resource.URLResource.exists.

Returns true if the respresenetd resource exists.

extractback to summary
public static void extract(Resource resource, File directory, boolean deleteOnExit) throws IOException
extractback to summary
public void extract(File directory, boolean deleteOnExit) throws IOException
getFileback to summary
public File getFile() throws IOException

Overrides org.mortbay.resource.URLResource.getFile.

Doc from org.mortbay.resource.URLResource.getFile.

Returns an File representing the given resource or NULL if this is not possible.

getInputStreamback to summary
public InputStream getInputStream() throws IOException

Overrides org.mortbay.resource.URLResource.getInputStream.

Doc from org.mortbay.resource.URLResource.getInputStream.

Returns an input stream to the resource

newConnectionback to summary
protected void newConnection() throws IOException
Exceptions
IOException:
Sub-classes of JarResource may throw an IOException (or subclass)
releaseback to summary
public synchronized void release()

Overrides org.mortbay.resource.URLResource.release.

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

Release any resources held by the resource.