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