Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.poifs.property
Class PropertyTable

    java.lang.Object
      org.apache.poi.poifs.property.PropertyTable

All Implemented Interfaces:
  BATManaged, BlockWritable

public class PropertyTable
extends java.lang.Object
implements 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
`PropertyTable()` Default constructor
`PropertyTable(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
`void` | `addProperty(Property property)` Add a property to the list of properties we manage
`int` | `countBlocks()` Return the number of BigBlock's this instance uses
`RootProperty` | `getRoot()` Get the root property
`int` | `getStartBlock()` Get the start block for the property table
`void` | `preWrite()` Prepare to be written
`void` | `removeProperty(Property property)` Remove a property from the list of properties we manage
`void` | `setStartBlock(int index)` Set the start block for this instance
`void` | `writeBlocks(java.io.OutputStream stream)` Write the storage to an OutputStream

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PropertyTable

    public PropertyTable()

  Default constructor

### PropertyTable

    public PropertyTable(int startBlock,
                         RawDataBlockList blockList)
                  throws java.io.IOException

  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 table
  `blockList` - the list of blocks
Throws:
  `java.io.IOException` - if anything goes wrong (which should be a result of the input being NFG)

Method Detail

### addProperty

    public void addProperty(Property property)

  Add a property to the list of properties we manage

  Parameters:
    `property` - the new Property to manage

### removeProperty

    public void removeProperty(Property property)

  Remove a property from the list of properties we manage

  Parameters:
    `property` - the Property to be removed

### getRoot

    public RootProperty 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:
    `countBlocks` in interface `BATManaged`
  Returns:
    count of BigBlock instances

### setStartBlock

    public void setStartBlock(int index)

  Set the start block for this instance

  Specified by:
    `setStartBlock` in interface `BATManaged`
  Parameters:
    `index` - index into the array of BigBlock instances making up the the filesystem

### writeBlocks

    public void writeBlocks(java.io.OutputStream stream)
                     throws java.io.IOException

  Write the storage to an OutputStream

  Specified by:
    `writeBlocks` in interface `BlockWritable`
  Parameters:
    `stream` - the OutputStream to which the stored data should be written
  Throws:
    `java.io.IOException` - on problems writing to the specified stream

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003 Apache Software Foundation.