Top Description Fields Constructors Methods
org.apache.poi.poifs.property

public final Class PropertyTable

extends Object
implements BATManaged
Class Inheritance
All Implemented Interfaces
org.apache.poi.poifs.filesystem.BATManaged
Imports
java.io.IOException, .OutputStream, java.nio.ByteBuffer, java.util.ArrayList, .List, .Stack, org.apache.logging.log4j.LogManager, .Logger, org.apache.poi.poifs.common.POIFSBigBlockSize, .POIFSConstants, org.apache.poi.poifs.filesystem.BATManaged, .POIFSFileSystem, .POIFSStream, org.apache.poi.poifs.storage.HeaderBlock, org.apache.poi.util.IOUtils

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.

Field Summary

Modifier and TypeField and Description
private final POIFSBigBlockSize
private final HeaderBlock
private final List<Property>
private static final Logger

Constructor Summary

AccessConstructor and Description
public
public
PropertyTable(final HeaderBlock
the header block of the file
headerBlock
,
final POIFSFileSystem
the filesystem to read from
filesystem
)

reading constructor (used when we've read in a file and we want to extract the property table from it).

pack-priv
PropertyTable(final HeaderBlock headerBlock, final Iterable<ByteBuffer> dataSource)

Method Summary

Modifier and TypeMethod and Description
public void
addProperty(Property
the new Property to manage
property
)

Add a property to the list of properties we manage

public int

Returns:

count of BigBlock instances
countBlocks
()

Implements org.apache.poi.poifs.filesystem.BATManaged.countBlocks.

Return the number of BigBlock's this instance uses

public RootProperty

Returns:

the root property
getRoot
()

Get the root property

public int

Returns:

start block index
getStartBlock
()

Get the start block for the property table

private boolean
isValidIndex(int index)

private void
public void
preWrite()

Prepare to be written

public void
removeProperty(final Property
the Property to be removed
property
)

Remove a property from the list of properties we manage

public void
setStartBlock(final int
index into the array of BigBlock instances making up the filesystem
index
)

Implements org.apache.poi.poifs.filesystem.BATManaged.setStartBlock.

Set the start block for this instance

public void
write(POIFSStream stream)

Writes the properties out into the given low-level stream

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_bigBigBlockSizeback to summary
private final POIFSBigBlockSize _bigBigBlockSize
_header_blockback to summary
private final HeaderBlock _header_block
_propertiesback to summary
private final List<Property> _properties
LOGback to summary
private static final Logger LOG

Constructor Detail

PropertyTableback to summary
public PropertyTable(HeaderBlock headerBlock)
PropertyTableback to summary
public PropertyTable(final HeaderBlock headerBlock, final POIFSFileSystem filesystem) throws 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:HeaderBlock

the header block of the file

filesystem:POIFSFileSystem

the filesystem to read from

Exceptions
IOException:
if anything goes wrong (which should be a result of the input being NFG)
PropertyTableback to summary
pack-priv PropertyTable(final HeaderBlock headerBlock, final Iterable<ByteBuffer> dataSource) throws IOException

Method Detail

addPropertyback to summary
public void addProperty(Property property)

Add a property to the list of properties we manage

Parameters
property:Property

the new Property to manage

countBlocksback to summary
public int countBlocks()

Implements org.apache.poi.poifs.filesystem.BATManaged.countBlocks.

Return the number of BigBlock's this instance uses

Returns:int

count of BigBlock instances

getRootback to summary
public RootProperty getRoot()

Get the root property

Returns:RootProperty

the root property

getStartBlockback to summary
public int getStartBlock()

Get the start block for the property table

Returns:int

start block index

isValidIndexback to summary
private boolean isValidIndex(int index)
populatePropertyTreeback to summary
private void populatePropertyTree(DirectoryProperty root) throws IOException
preWriteback to summary
public void preWrite()

Prepare to be written

removePropertyback to summary
public void removeProperty(final Property property)

Remove a property from the list of properties we manage

Parameters
property:Property

the Property to be removed

setStartBlockback to summary
public void setStartBlock(final int index)

Implements org.apache.poi.poifs.filesystem.BATManaged.setStartBlock.

Set the start block for this instance

Parameters
index:int

index into the array of BigBlock instances making up the filesystem

writeback to summary
public void write(POIFSStream stream) throws IOException

Writes the properties out into the given low-level stream