public final class PropertyTable extends java.lang.Object implements BATManaged
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.
(此类体现了 POIFSFileSystem 的属性表;这基本上是文件系统中所有文档的目录,并在文件系统中查找其块链中的条目。)
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).
|
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
(返回此实例使用的 BigBlock 的数量)
|
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
(将属性写入给定的低级流)
|
public PropertyTable(HeaderBlock headerBlock)
public PropertyTable(HeaderBlock headerBlock, POIFSFileSystem filesystem) throws java.io.IOException
headerBlock
- the header block of the file
(headerBlock - 文件的头块)
filesystem
- the filesystem to read from
(filesystem - 要读取的文件系统)
java.io.IOException
- if anything goes wrong (which should be a result of the input being NFG)
(java.io.IOException - 如果出现任何问题(这应该是输入为 NFG 的结果))
public void addProperty(Property property)
property
- the new Property to manage
(property - 要管理的新属性)
public void removeProperty(Property property)
property
- the Property to be removed
(property - 要删除的属性)
public RootProperty getRoot()
public int getStartBlock()
public void setStartBlock(int index)
setStartBlock
in interface
BATManaged
(接口 BATManaged 中的 setStartBlock)
index
- index into the array of BigBlock instances making up the the filesystem
(index - 组成文件系统的 BigBlock 实例数组的索引)
public int countBlocks()
countBlocks
in interface
BATManaged
(接口 BATManaged 中的 countBlocks)
public void preWrite()
public void write(POIFSStream stream) throws java.io.IOException
java.io.IOException
(java.io.IOException)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.