org.apache.poi.poifs.property

## Class PropertyTable

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

- All Implemented Interfaces:
    BATManaged

      public final class PropertyTable
      extends java.lang.Object
      implements BATManaged

  This class embodies the Property Table for a `POIFSFileSystem`; this is basically the directory for all of the documents in the filesystem and looks up entries in the filesystem to their chain of blocks.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PropertyTable(HeaderBlock headerBlock)`
    `PropertyTable(HeaderBlock headerBlock, POIFSFileSystem filesystem)` reading constructor (used when we've read in a file and we want to extract the property table from it).

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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` | `write(POIFSStream stream)` Writes the properties out into the given low-level stream

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PropertyTable

          public PropertyTable(HeaderBlock headerBlock)

    - #### PropertyTable

          public PropertyTable(HeaderBlock headerBlock,
                               POIFSFileSystem filesystem)
                        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:
        `headerBlock` - the header block of the file
        `filesystem` - the filesystem to read from
      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

    - #### getStartBlock

          public int getStartBlock()

      Get the start block for the property table
      Returns:
        start block index

    - #### 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

    - #### countBlocks

          public int countBlocks()

      Return the number of BigBlock's this instance uses
      Specified by:
        `countBlocks` in interface `BATManaged`
      Returns:
        count of BigBlock instances

    - #### preWrite

          public void preWrite()

      Prepare to be written

    - #### write

          public void write(POIFSStream stream)
                     throws java.io.IOException

      Writes the properties out into the given low-level stream
      Throws:
        `java.io.IOException`

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.