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.

Constructor Index

 o ZipFileResource()

Method Index

 o getEntryPath()
 o getEntrySize()
 o getFile()
Get this zip file.
 o getInputStream()
 o hasEntry()
 o newContent(InputStream)
Save the given stream as the underlying file content.
 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.

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 getEntrySize
 protected synchronized long getEntrySize()
 o hasEntry
 protected synchronized boolean hasEntry()
 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()
Is that resource still wrapping an existing file ? If the underlying file has disappeared and if the container directory is extensible, remove the resource.

Returns:
A boolean.
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

All Packages  Class Hierarchy  This Package  Previous  Next  Index