Package loci.poi.poifs.property
Class DirectoryProperty
java.lang.Object
loci.poi.poifs.property.Property
loci.poi.poifs.property.DirectoryProperty
- All Implemented Interfaces:
POIFSViewable,Child,Parent
- Direct Known Subclasses:
RootProperty
Directory property
- Author:
- Marc Johnson (mjohnson at apache dot org)
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class loci.poi.poifs.property.Property
_NO_INDEX, _NODE_BLACK, _NODE_RED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDirectoryProperty(int index, byte[] array, int offset) reader constructorDirectoryProperty(String name) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a new child to the collection of childrenbooleanchangeName(Property property, String newName) Change a Property's namebooleandeleteChild(Property property) Delete a PropertyGet an iterator over the children of this Parent; all elements are instances of Property.booleanprotected voidpreWrite()Perform whatever activities need to be performed prior to writingMethods inherited from class loci.poi.poifs.property.Property
getChildIndex, getIndex, getName, getNextChild, getPreviousChild, getShortDescription, getSize, getStartBlock, getStorageClsid, getViewableArray, getViewableIterator, isSmall, preferArray, setChildProperty, setIndex, setName, setNextChild, setNodeColor, setPreviousChild, setPropertyType, setSize, setStartBlock, setStorageClsid, shouldUseSmallBlocks, writeDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface loci.poi.poifs.property.Child
getNextChild, getPreviousChildMethods inherited from interface loci.poi.poifs.property.Parent
setNextChild, setPreviousChild
-
Constructor Details
-
DirectoryProperty
Default constructor- Parameters:
name- the name of the directory
-
DirectoryProperty
protected DirectoryProperty(int index, byte[] array, int offset) reader constructor- Parameters:
index- index numberarray- byte dataoffset- offset into byte data
-
-
Method Details
-
changeName
Change a Property's name- Parameters:
property- the Property whose name is being changednewName- the new name for the Property- Returns:
- true if the name change could be made, else false
-
deleteChild
Delete a Property- Parameters:
property- the Property being deleted- Returns:
- true if the Property could be deleted, else false
-
isDirectory
public boolean isDirectory()- Specified by:
isDirectoryin classProperty- Returns:
- true if a directory type Property
-
preWrite
protected void preWrite()Perform whatever activities need to be performed prior to writing -
getChildren
Get an iterator over the children of this Parent; all elements are instances of Property.- Specified by:
getChildrenin interfaceParent- Returns:
- Iterator of children; may refer to an empty collection
-
addChild
Add a new child to the collection of children- Specified by:
addChildin interfaceParent- Parameters:
property- the new child to be added; must not be null- Throws:
IOException- if we already have a child with the same name
-