public abstract class PropertiesChunk extends Chunk
A Chunk which holds (single) fixed-length properties, and pointer to the variable length ones / multi-valued ones (which get their own chunk).
There are two kinds of PropertiesChunks, which differ only in their headers.
(一个拥有(单个)固定长度属性的块,以及指向可变长度属性/多值属性(获得自己的块)的指针。有两种 PropertiesChunk,它们的区别仅在于它们的标题。)Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
static int |
PROPERTIES_FLAG_READABLE |
static int |
PROPERTIES_FLAG_WRITEABLE |
static java.lang.String |
VARIABLE_LENGTH_PROPERTY_PREFIX |
DEFAULT_NAME_PREFIX
Modifier | Constructor and Description |
---|---|
protected |
PropertiesChunk(ChunkGroup parentGroup)
Creates a Properties Chunk.
(创建一个属性块。)
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getEntryName()
Creates a string to use to identify this chunk in the POI file system object.
(创建一个字符串,用于在 POI 文件系统对象中标识此块。)
|
java.util.Map<MAPIProperty,java.util.List<PropertyValue>> |
getProperties()
Returns all the properties in the chunk, along with their values.
(返回块中的所有属性及其值。)
|
java.util.Map<MAPIProperty,PropertyValue> |
getRawProperties()
Returns all the properties in the chunk, without looking up any chunk-based values
(返回块中的所有属性,而不查找任何基于块的值)
|
PropertyValue |
getRawValue(MAPIProperty property)
Returns the value / pointer to the value chunk of the property, or null if none exists
(返回指向属性值块的值/指针,如果不存在则返回 null)
|
java.util.List<PropertyValue> |
getValues(MAPIProperty property)
Returns all values for the given property, looking up chunk based ones as required, of null if none exist
(返回给定属性的所有值,根据需要查找基于块的值,如果不存在则为 null)
|
protected void |
matchVariableSizedPropertiesToChunks()
Called once the parent ChunkGroup has been populated, to match up the Chunks in it with our Variable Sized Properties.
(填充父 ChunkGroup 后调用,以将其中的块与我们的可变大小属性匹配。)
|
protected void |
readProperties(java.io.InputStream value) |
void |
setProperty(PropertyValue value)
Defines a property.
(定义一个属性。)
|
protected void |
writeNodeData(DirectoryEntry directory, java.util.List<PropertyValue> values)
Write the nodes for variable-length data.
(为可变长度数据编写节点。)
|
void |
writeProperties(DirectoryEntry directory)
Writes this chunk in the specified
DirectoryEntry .
(将此块写入指定的 DirectoryEntry。)
|
protected java.util.List<PropertyValue> |
writeProperties(java.io.OutputStream out)
Writes the header of the properties.
(写入属性的标题。)
|
getChunkId, getType, readValue, writeValue
public static final java.lang.String NAME
public static final java.lang.String VARIABLE_LENGTH_PROPERTY_PREFIX
public static final int PROPERTIES_FLAG_READABLE
public static final int PROPERTIES_FLAG_WRITEABLE
protected PropertiesChunk(ChunkGroup parentGroup)
public java.lang.String getEntryName()
Chunk
getEntryName
in class
Chunk
public java.util.Map<MAPIProperty,PropertyValue> getRawProperties()
public java.util.Map<MAPIProperty,java.util.List<PropertyValue>> getProperties()
Returns all the properties in the chunk, along with their values.
Any chunk-based values will be looked up and returned as such
(返回块中的所有属性及其值。任何基于块的值都将被查找并返回)public void setProperty(PropertyValue value)
public java.util.List<PropertyValue> getValues(MAPIProperty property)
public PropertyValue getRawValue(MAPIProperty property)
protected void matchVariableSizedPropertiesToChunks()
protected void readProperties(java.io.InputStream value) throws java.io.IOException
java.io.IOException
(java.io.IOException)
public void writeProperties(DirectoryEntry directory) throws java.io.IOException
DirectoryEntry
.
(将此块写入指定的 DirectoryEntry。)
directory
- The directory.
(目录 - 目录。)
java.io.IOException
- If an I/O error occurs.
(java.io.IOException - 如果发生 I/O 错误。)
protected void writeNodeData(DirectoryEntry directory, java.util.List<PropertyValue> values) throws java.io.IOException
writeProperties(java.io.OutputStream)
.
()
directory
- The directory.
(目录 - 目录。)
values
- The values.
(价值观 - 价值观。)
java.io.IOException
- If an I/O error occurs.
(java.io.IOException - 如果发生 I/O 错误。)
protected java.util.List<PropertyValue> writeProperties(java.io.OutputStream out) throws java.io.IOException
out
- The
OutputStream
.
(out - 输出流。)
java.io.IOException
- If an I/O error occurs.
(java.io.IOException - 如果发生 I/O 错误。)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.