All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.w3c.jigsaw.zip.ZipFileResource

java.lang.Object
   |
   +----org.w3c.tools.resources.AttributeHolder
           |
           +----org.w3c.tools.resources.Resource
                   |
                   +----org.w3c.tools.resources.FramedResource
                           |
                           +----org.w3c.tools.resources.FileResource
                                   |
                                   +----org.w3c.jigsaw.zip.ZipFileResource

public class ZipFileResource
extends FileResource

Variable Index

 o ATTR_ENTRYPATH
Attribute index - The index for our entry path.
 o ATTR_ZIPFILE
Attributes index - The filename attribute.
 o zipfile

Constructor Index

 o ZipFileResource()

Method Index

 o delete()
Delete this Resource instance, and remove it from its store.
 o getEntry()
 o getEntryPath()
 o getFile()
Get this zip file.
 o getInputStream()
 o newContent(InputStream)
Save the given stream as the underlying file content.
 o notifyUnload()
This resource is being unloaded.
 o updateFileAttributes()
Update the file related attributes.
 o verify()
Is that resource still wrapping an existing file ? If the underlying file has disappeared and if the container directory is extensible, remove the resource.

Variables

 o ATTR_ZIPFILE
 protected static int ATTR_ZIPFILE
Attributes index - The filename attribute.

 o ATTR_ENTRYPATH
 protected static int ATTR_ENTRYPATH
Attribute index - The index for our entry path.

 o zipfile
 protected ZipFile zipfile

Constructors

 o ZipFileResource
 public ZipFileResource()

Methods

 o getFile
 public synchronized File getFile()
Get this zip file.

Overrides:
getFile in class FileResource
 o getEntryPath
 public String getEntryPath()
 o getInputStream
 protected synchronized InputStream getInputStream()
 o getEntry
 protected synchronized ZipEntry getEntry()
 o updateFileAttributes
 public void updateFileAttributes()
Update the file related attributes. The file we serve has changed since the last time we checked it, if any of the attribute values depend on the file content, this is the appropriate place to recompute them.

Overrides:
updateFileAttributes in class FileResource
 o verify
 public synchronized boolean verify() throws MultipleLockException
Is that resource still wrapping an existing file ? If the underlying file has disappeared and if the container directory is extensible, remove the resource.

Overrides:
verify in class FileResource
 o newContent
 public synchronized boolean newContent(InputStream in) throws IOException
Save the given stream as the underlying file content. This method preserve the old file version in a ~ file.

Parameters:
in - The input stream to use as the resource entity.
Returns:
A boolean, true if the resource was just created, false otherwise.
Throws: IOException
If dumping the content failed.
Overrides:
newContent in class FileResource
 o delete
 public synchronized void delete() throws MultipleLockException
Delete this Resource instance, and remove it from its store. This method will erase definitely this resource, for ever, by removing it from its resource store (when doable).

Overrides:
delete in class FramedResource
 o notifyUnload
 public void notifyUnload()
This resource is being unloaded. The resource is being unloaded from memory, perform any additional cleanup required.

Overrides:
notifyUnload in class FramedResource

All Packages  Class Hierarchy  This Package  Previous  Next  Index