public abstract class ZipDirectoryPath extends AbstractDirectoryPath implements DirectoryPath
This class represents DirectoryPath
for ZIP archives. Subclasses simply need to implement a
getZipFile()
method to retrieve a ZIP archive and
absoluteEntryOf(String)
method which returns an absolute
path of a specified entry in the archive.
Constructor and Description |
---|
ZipDirectoryPath(String name,
DirectoryPath parent)
Builds a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected abstract String |
absoluteEntryOf(String child)
Gets the absolute entry name of the given
String built relatively to this directory's archive. |
protected Path |
buildChild(String child)
Builds the path corresponding to the given direct child name of this directory.
|
protected abstract ZipFile |
getZipFile()
Gets the ZIP file related to this directory.
|
getChild
getAbsolutePath, getName, getParent, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getChild, list
getAbsolutePath, getLastUpdate, getName, getParent
public ZipDirectoryPath(String name, DirectoryPath parent)
Builds a new instance.
name
- the nameparent
- the parentprotected Path buildChild(String child) throws IOException
Builds the path corresponding to the given direct child name of this directory.
buildChild
in class AbstractDirectoryPath
child
- the child nameIOException
- if any I/O error occursprotected abstract ZipFile getZipFile() throws IOException
Gets the ZIP file related to this directory.
IOException
- if any I/O error occursprotected abstract String absoluteEntryOf(String child) throws IOException
Gets the absolute entry name of the given String
built relatively to this directory's archive.
IOException
- if any I/O error occursCopyright © 2012-2015. All Rights Reserved.