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
-
ATTR_ENTRYPATH
- Attribute index - The index for our entry path.
-
ATTR_ZIPFILE
- Attributes index - The filename attribute.
-
zipfile
-
-
ZipFileResource()
-
-
delete()
- Delete this Resource instance, and remove it from its store.
-
getEntry()
-
-
getEntryPath()
-
-
getFile()
- Get this zip file.
-
getInputStream()
-
-
newContent(InputStream)
- Save the given stream as the underlying file content.
-
notifyUnload()
- This resource is being unloaded.
-
updateFileAttributes()
- Update the file related attributes.
-
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.
ATTR_ZIPFILE
protected static int ATTR_ZIPFILE
- Attributes index - The filename attribute.
ATTR_ENTRYPATH
protected static int ATTR_ENTRYPATH
- Attribute index - The index for our entry path.
zipfile
protected ZipFile zipfile
ZipFileResource
public ZipFileResource()
getFile
public synchronized File getFile()
- Get this zip file.
- Overrides:
- getFile in class FileResource
getEntryPath
public String getEntryPath()
getInputStream
protected synchronized InputStream getInputStream()
getEntry
protected synchronized ZipEntry getEntry()
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
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
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
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
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