|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.poifs.property.Property
public abstract class Property
This abstract base class is the ancestor of all classes implementing POIFS Property behavior.
Field Summary | |
---|---|
protected static int |
_NO_INDEX
|
protected static byte |
_NODE_BLACK
|
protected static byte |
_NODE_RED
|
Constructor Summary | |
---|---|
protected |
Property()
|
protected |
Property(int index,
byte[] array,
int offset)
Constructor from byte data |
Method Summary | |
---|---|
protected int |
getChildIndex()
Get the child property (its index in the Property Table) |
protected int |
getIndex()
get the index for this Property |
java.lang.String |
getName()
Get the name of this property |
Child |
getNextChild()
Get the next Child, if any |
Child |
getPreviousChild()
Get the previous Child, if any |
java.lang.String |
getShortDescription()
Provides a short description of the object, to be used when a POIFSViewable object has not provided its contents. |
int |
getSize()
find out the document size |
int |
getStartBlock()
|
ClassID |
getStorageClsid()
Sets the storage clsid, which is the Class ID of a COM object which reads and writes this stream |
java.lang.Object[] |
getViewableArray()
Get an array of objects, some of which may implement POIFSViewable |
java.util.Iterator |
getViewableIterator()
Get an Iterator of objects, some of which may implement POIFSViewable |
abstract boolean |
isDirectory()
|
static boolean |
isSmall(int length)
does the length indicate a small document? |
boolean |
preferArray()
Give viewers a hint as to whether to call getViewableArray or getViewableIterator |
protected abstract void |
preWrite()
Perform whatever activities need to be performed prior to writing |
protected void |
setChildProperty(int child)
Set the child property. |
protected void |
setIndex(int index)
Set the index for this Property |
protected void |
setName(java.lang.String name)
Set the name; silently truncates the name if it's too long. |
void |
setNextChild(Child child)
Set the next Child |
protected void |
setNodeColor(byte nodeColor)
Set the node color. |
void |
setPreviousChild(Child child)
Set the previous Child |
protected void |
setPropertyType(byte propertyType)
Set the property type. |
protected void |
setSize(int size)
Set the size of the document associated with this Property |
void |
setStartBlock(int startBlock)
Set the start block for the document referred to by this Property. |
void |
setStorageClsid(ClassID clsidStorage)
Sets the storage class ID for this property stream. |
boolean |
shouldUseSmallBlocks()
Based on the currently defined size, should this property use small blocks? |
void |
writeData(java.io.OutputStream stream)
Write the raw data to an OutputStream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int _NO_INDEX
protected static final byte _NODE_BLACK
protected static final byte _NODE_RED
Constructor Detail |
---|
protected Property()
protected Property(int index, byte[] array, int offset)
index
- index numberarray
- byte dataoffset
- offset into byte dataMethod Detail |
---|
public void writeData(java.io.OutputStream stream) throws java.io.IOException
stream
- the OutputStream to which the data should be
written.
java.io.IOException
- on problems writing to the specified
stream.public void setStartBlock(int startBlock)
startBlock
- the start block indexpublic int getStartBlock()
public int getSize()
public boolean shouldUseSmallBlocks()
public static boolean isSmall(int length)
length
- length in bytes
public java.lang.String getName()
public abstract boolean isDirectory()
public ClassID getStorageClsid()
protected void setName(java.lang.String name)
name
- the new namepublic void setStorageClsid(ClassID clsidStorage)
clsidStorage
- Storage Class IDprotected void setPropertyType(byte propertyType)
propertyType
- the property type (root, file, directory)protected void setNodeColor(byte nodeColor)
nodeColor
- the node color (red or black)protected void setChildProperty(int child)
child
- the child property's index in the Property Tableprotected int getChildIndex()
protected void setSize(int size)
size
- the size of the document, in bytesprotected void setIndex(int index)
index
- this Property's index within its containing
Property Tableprotected int getIndex()
protected abstract void preWrite()
public Child getNextChild()
getNextChild
in interface Child
public Child getPreviousChild()
getPreviousChild
in interface Child
public void setNextChild(Child child)
setNextChild
in interface Child
child
- the new 'next' child; may be null, which has the
effect of saying there is no 'next' childpublic void setPreviousChild(Child child)
setPreviousChild
in interface Child
child
- the new 'previous' child; may be null, which has
the effect of saying there is no 'previous' childpublic java.lang.Object[] getViewableArray()
getViewableArray
in interface POIFSViewable
public java.util.Iterator getViewableIterator()
getViewableIterator
in interface POIFSViewable
public boolean preferArray()
preferArray
in interface POIFSViewable
public java.lang.String getShortDescription()
getShortDescription
in interface POIFSViewable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |