public abstract class Property extends Object implements Child, POIFSViewable
Modifier and Type | Field and Description |
---|---|
protected static int |
_NO_INDEX |
protected static byte |
_NODE_BLACK |
protected static byte |
_NODE_RED |
Modifier | Constructor and Description |
---|---|
protected |
Property()
Default constructor
|
protected |
Property(int index,
byte[] array,
int offset)
Constructor from byte data
|
Modifier and Type | Method and Description |
---|---|
protected int |
getChildIndex()
Get the child property (its index in the Property Table)
|
protected int |
getIndex()
get the index for this Property
|
String |
getName()
Get the name of this property
|
Child |
getNextChild()
Get the next Child, if any
|
Child |
getPreviousChild()
Get the previous Child, if any
|
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
|
Object[] |
getViewableArray()
Get an array of objects, some of which may implement
POIFSViewable
|
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(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(OutputStream stream)
Write the raw data to an OutputStream.
|
protected static final int _NO_INDEX
protected static final byte _NODE_BLACK
protected static final byte _NODE_RED
protected Property()
protected Property(int index, byte[] array, int offset)
index
- index numberarray
- byte dataoffset
- offset into byte datapublic void writeData(OutputStream stream) throws IOException
stream
- the OutputStream to which the data should be
written.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 bytespublic String getName()
public abstract boolean isDirectory()
public ClassID getStorageClsid()
protected final void setName(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 Object[] getViewableArray()
getViewableArray
in interface POIFSViewable
public Iterator getViewableIterator()
getViewableIterator
in interface POIFSViewable
public boolean preferArray()
preferArray
in interface POIFSViewable
public String getShortDescription()
getShortDescription
in interface POIFSViewable
Copyright © 2014 Open Microscopy Environment