Methods Summary |
---|
public void | addProperty(org.apache.poi.poifs.property.Property property)Add a property to the list of properties we manage
_properties.add(property);
|
public int | countBlocks()Return the number of BigBlock's this instance uses
return (_blocks == null) ? 0
: _blocks.length;
|
public org.apache.poi.poifs.property.RootProperty | getRoot()Get the root property
// it's always the first element in the List
return ( RootProperty ) _properties.get(0);
|
public int | getStartBlock()Get the start block for the property table
return _start_block;
|
private void | populatePropertyTree(org.apache.poi.poifs.property.DirectoryProperty root)
int index = root.getChildIndex();
if (!Property.isValidIndex(index))
{
// property has no children
return;
}
Stack children = new Stack();
children.push(_properties.get(index));
while (!children.empty())
{
Property property = ( Property ) children.pop();
root.addChild(property);
if (property.isDirectory())
{
populatePropertyTree(( DirectoryProperty ) property);
}
index = property.getPreviousChildIndex();
if (Property.isValidIndex(index))
{
children.push(_properties.get(index));
}
index = property.getNextChildIndex();
if (Property.isValidIndex(index))
{
children.push(_properties.get(index));
}
}
|
public void | preWrite()Prepare to be written
Property[] properties =
( Property [] ) _properties.toArray(new Property[ 0 ]);
// give each property its index
for (int k = 0; k < properties.length; k++)
{
properties[ k ].setIndex(k);
}
// allocate the blocks for the property table
_blocks = PropertyBlock.createPropertyBlockArray(_properties);
// prepare each property for writing
for (int k = 0; k < properties.length; k++)
{
properties[ k ].preWrite();
}
|
public void | removeProperty(org.apache.poi.poifs.property.Property property)Remove a property from the list of properties we manage
_properties.remove(property);
|
public void | setStartBlock(int index)Set the start block for this instance
_start_block = index;
|
public void | writeBlocks(java.io.OutputStream stream)Write the storage to an OutputStream
if (_blocks != null)
{
for (int j = 0; j < _blocks.length; j++)
{
_blocks[ j ].writeBlocks(stream);
}
}
|