|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.poifs.filesystem.POIFSDocumentPath
public class POIFSDocumentPath
Class POIFSDocumentPath
Constructor Summary | |
---|---|
POIFSDocumentPath()
simple constructor for the path of a document that is in the root of the POIFSFileSystem. |
|
POIFSDocumentPath(POIFSDocumentPath path,
java.lang.String[] components)
constructor that adds additional subdirectories to an existing path |
|
POIFSDocumentPath(java.lang.String[] components)
constructor for the path of a document that is not in the root of the POIFSFileSystem |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
equality. |
java.lang.String |
getComponent(int n)
get the specified component |
POIFSDocumentPath |
getParent()
Returns the path's parent or null if this path
is the root path. |
int |
hashCode()
calculate and return the hashcode |
int |
length()
|
java.lang.String |
toString()
Returns a string representation of the path. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public POIFSDocumentPath(java.lang.String[] components) throws java.lang.IllegalArgumentException
components
- the Strings making up the path to a document.
The Strings must be ordered as they appear in
the directory hierarchy of the the document
-- the first string must be the name of a
directory in the root of the POIFSFileSystem,
and every Nth (for N > 1) string thereafter
must be the name of a directory in the
directory identified by the (N-1)th string.
If the components parameter is null or has zero length, the POIFSDocumentPath is appropriate for a document that is in the root of a POIFSFileSystem
java.lang.IllegalArgumentException
- if any of the elements in
the components parameter
are null or have zero
lengthpublic POIFSDocumentPath()
public POIFSDocumentPath(POIFSDocumentPath path, java.lang.String[] components) throws java.lang.IllegalArgumentException
path
- the existing pathcomponents
- the additional subdirectory names to be added
java.lang.IllegalArgumentException
- if any of the Strings in
components is null or zero
lengthMethod Detail |
---|
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the object we're checking equality for
public int hashCode()
hashCode
in class java.lang.Object
public int length()
public java.lang.String getComponent(int n) throws java.lang.ArrayIndexOutOfBoundsException
n
- which component (0 ... length() - 1)
java.lang.ArrayIndexOutOfBoundsException
- if n < 0 or n >=
length()public POIFSDocumentPath getParent()
Returns the path's parent or null
if this path
is the root path.
public java.lang.String toString()
Returns a string representation of the path. Components are separated by the platform-specific file separator.
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |