Package loci.poi.poifs.property
Class PropertyTable
java.lang.Object
loci.poi.poifs.property.PropertyTable
- All Implemented Interfaces:
BATManaged,BlockWritable
This class embodies the Property Table for the filesystem; this is
basically the dsirectory for all of the documents in the
filesystem.
- Author:
- Marc Johnson (mjohnson at apache dot org)
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorPropertyTable(int startBlock, RawDataBlockList blockList) reading constructor (used when we've read in a file and we want to extract the property table from it). -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(Property property) Add a property to the list of properties we manageintReturn the number of BigBlock's this instance usesgetRoot()Get the root propertyintGet the start block for the property tablevoidpreWrite()Prepare to be writtenvoidremoveProperty(Property property) Remove a property from the list of properties we managevoidsetStartBlock(int index) Set the start block for this instancevoidwriteBlocks(OutputStream stream) Write the storage to an OutputStream
-
Constructor Details
-
PropertyTable
public PropertyTable()Default constructor -
PropertyTable
reading constructor (used when we've read in a file and we want to extract the property table from it). Populates the properties thoroughly- Parameters:
startBlock- the first block of the property tableblockList- the list of blocks- Throws:
IOException- if anything goes wrong (which should be a result of the input being NFG)
-
-
Method Details
-
addProperty
Add a property to the list of properties we manage- Parameters:
property- the new Property to manage
-
removeProperty
Remove a property from the list of properties we manage- Parameters:
property- the Property to be removed
-
getRoot
Get the root property- Returns:
- the root property
-
preWrite
public void preWrite()Prepare to be written -
getStartBlock
public int getStartBlock()Get the start block for the property table- Returns:
- start block index
-
countBlocks
public int countBlocks()Return the number of BigBlock's this instance uses- Specified by:
countBlocksin interfaceBATManaged- Returns:
- count of BigBlock instances
-
setStartBlock
public void setStartBlock(int index) Set the start block for this instance- Specified by:
setStartBlockin interfaceBATManaged- Parameters:
index- index into the array of BigBlock instances making up the the filesystem
-
writeBlocks
Write the storage to an OutputStream- Specified by:
writeBlocksin interfaceBlockWritable- Parameters:
stream- the OutputStream to which the stored data should be written- Throws:
IOException- on problems writing to the specified stream
-