|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.file.TableOfContents
public class TableOfContents
An instance of this class contains a list of DirectoryContnts objects.
The purpose is to hold in one object all directory and file information
from either an archive (zip/jar) or a base direcory (e.g. "/usr/apps/conf").
To represent both types in a common information structure allows to present
or analyze the content information in a common way.
| Constructor Summary | |
|---|---|
TableOfContents(java.lang.String name)
Initialize the new instance with default values. |
|
| Method Summary | |
|---|---|
void |
add(DirectoryContents dir)
Adds the given directory contents holder to the table of contents |
DirectoryContents |
dirContentAt(int index)
Returns the DirectoryContents entry at the specified index. |
java.lang.String |
dirNameAt(int index)
Returns the name of the directory entry at the specified index. |
FileInfo[] |
filesAt(int index)
Returns the file info objects of the directory entry at the specified index. |
DirectoryContents[] |
getDirectories()
Returns all contained directories |
java.lang.String |
getName()
Returns the name of the container this table of contents belongs to |
int |
size()
Returns the number of directory entries in this table of contents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TableOfContents(java.lang.String name)
| Method Detail |
|---|
public java.lang.String getName()
public void add(DirectoryContents dir)
public DirectoryContents[] getDirectories()
public int size()
public DirectoryContents dirContentAt(int index)
java.lang.ArrayIndexOutOfBoundsException - if the index is not validpublic java.lang.String dirNameAt(int index)
java.lang.ArrayIndexOutOfBoundsException - if the index is not validpublic FileInfo[] filesAt(int index)
java.lang.ArrayIndexOutOfBoundsException - if the index is not valid
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||