| java.lang.Object org.apache.poi.poifs.property.Property
All known Subclasses: org.apache.poi.poifs.storage.LocalProperty, org.apache.poi.poifs.property.LocalProperty, org.apache.poi.poifs.property.DocumentProperty, org.apache.poi.poifs.property.DirectoryProperty,
Property | abstract public class Property implements Child,POIFSViewable(Code) | | This abstract base class is the ancestor of all classes
implementing POIFS Property behavior.
author: Marc Johnson (mjohnson at apache dot org) |
Constructor Summary | |
protected | Property() | protected | Property(int index, byte[] array, int offset) |
_NODE_BLACK | final protected static byte _NODE_BLACK(Code) | | |
_NODE_RED | final protected static byte _NODE_RED(Code) | | |
_NO_INDEX | final protected static int _NO_INDEX(Code) | | |
Property | protected Property()(Code) | | Default constructor
|
Property | protected Property(int index, byte[] array, int offset)(Code) | | Constructor from byte data
Parameters: index - index number Parameters: array - byte data Parameters: offset - offset into byte data |
getChildIndex | protected int getChildIndex()(Code) | | Get the child property (its index in the Property Table)
child property index |
getIndex | protected int getIndex()(Code) | | get the index for this Property
the index of this Property within its Property Table |
getName | public String getName()(Code) | | Get the name of this property
property name as String |
getNextChild | public Child getNextChild()(Code) | | Get the next Child, if any
the next Child; may return null |
getNextChildIndex | int getNextChildIndex()(Code) | | get the next sibling
index of next sibling |
getPreviousChild | public Child getPreviousChild()(Code) | | Get the previous Child, if any
the previous Child; may return null |
getPreviousChildIndex | int getPreviousChildIndex()(Code) | | get the previous sibling
index of previous sibling |
getShortDescription | public String getShortDescription()(Code) | | Provides a short description of the object, to be used when a
POIFSViewable object has not provided its contents.
short description |
getSize | public int getSize()(Code) | | find out the document size
size in bytes |
getStartBlock | public int getStartBlock()(Code) | | the start block |
getStorageClsid | public ClassID getStorageClsid()(Code) | | Sets the storage clsid, which is the Class ID of a COM object which
reads and writes this stream
storage Class ID for this property stream |
getViewableArray | public Object[] getViewableArray()(Code) | | Get an array of objects, some of which may implement
POIFSViewable
an array of Object; may not be null, but may be empty |
getViewableIterator | public Iterator getViewableIterator()(Code) | | Get an Iterator of objects, some of which may implement
POIFSViewable
an Iterator; may not be null, but may have an emptyback end store |
isDirectory | abstract public boolean isDirectory()(Code) | | true if a directory type Property |
isSmall | public static boolean isSmall(int length)(Code) | | does the length indicate a small document?
Parameters: length - length in bytes true if the length is less than_big_block_minimum_bytes |
isValidIndex | static boolean isValidIndex(int index)(Code) | | determine whether the specified index is valid
Parameters: index - value to be checked true if the index is valid |
preWrite | abstract protected void preWrite()(Code) | | Perform whatever activities need to be performed prior to
writing
|
preferArray | public boolean preferArray()(Code) | | Give viewers a hint as to whether to call getViewableArray or
getViewableIterator
true if a viewer should call getViewableArray, false ifa viewer should call getViewableIterator |
setChildProperty | protected void setChildProperty(int child)(Code) | | Set the child property.
Parameters: child - the child property's index in the Property Table |
setIndex | protected void setIndex(int index)(Code) | | Set the index for this Property
Parameters: index - this Property's index within its containingProperty Table |
setName | final protected void setName(String name)(Code) | | Set the name; silently truncates the name if it's too long.
Parameters: name - the new name |
setNextChild | public void setNextChild(Child child)(Code) | | Set the next Child
Parameters: child - the new 'next' child; may be null, which has theeffect of saying there is no 'next' child |
setNodeColor | protected void setNodeColor(byte nodeColor)(Code) | | Set the node color.
Parameters: nodeColor - the node color (red or black) |
setPreviousChild | public void setPreviousChild(Child child)(Code) | | Set the previous Child
Parameters: child - the new 'previous' child; may be null, which hasthe effect of saying there is no 'previous' child |
setPropertyType | protected void setPropertyType(byte propertyType)(Code) | | Set the property type. Makes no attempt to validate the value.
Parameters: propertyType - the property type (root, file, directory) |
setSize | protected void setSize(int size)(Code) | | Set the size of the document associated with this Property
Parameters: size - the size of the document, in bytes |
setStartBlock | public void setStartBlock(int startBlock)(Code) | | Set the start block for the document referred to by this
Property.
Parameters: startBlock - the start block index |
setStorageClsid | public void setStorageClsid(ClassID clsidStorage)(Code) | | Sets the storage class ID for this property stream. This is the Class ID
of the COM object which can read and write this property stream
Parameters: clsidStorage - Storage Class ID |
shouldUseSmallBlocks | public boolean shouldUseSmallBlocks()(Code) | | Based on the currently defined size, should this property use
small blocks?
true if the size is less than _big_block_minimum_bytes |
writeData | public void writeData(OutputStream stream) throws IOException(Code) | | Write the raw data to an OutputStream.
Parameters: stream - the OutputStream to which the data should bewritten. exception: IOException - on problems writing to the specifiedstream. |
|
|