Package org.apache.poi.hsmf.datatypes
Class PropertiesChunk
java.lang.Object
org.apache.poi.hsmf.datatypes.Chunk
org.apache.poi.hsmf.datatypes.PropertiesChunk
- Direct Known Subclasses:
MessagePropertiesChunk,StoragePropertiesChunk
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intstatic final intstatic final StringFields inherited from class org.apache.poi.hsmf.datatypes.Chunk
DEFAULT_NAME_PREFIX -
Method Summary
Modifier and TypeMethodDescriptionCreates a string to use to identify this chunk in the POI file system object.static intReturns all the properties in the chunk, along with their values.Returns all the properties in the chunk, without looking up any chunk-based valuesgetRawValue(MAPIProperty property) Returns the value / pointer to the value chunk of the property, or null if none existsgetValues(MAPIProperty property) Returns all values for the given property, looking up chunk based ones as required, of null if none existstatic voidsetMaxRecordLength(int length) voidsetProperty(PropertyValue value) Defines a property.voidwriteProperties(DirectoryEntry directory) Writes this chunk in the specifiedDirectoryEntry.Methods inherited from class org.apache.poi.hsmf.datatypes.Chunk
getChunkId, getType, readValue, writeValue
-
Field Details
-
NAME
- See Also:
-
VARIABLE_LENGTH_PROPERTY_PREFIX
- See Also:
-
PROPERTIES_FLAG_READABLE
public static final int PROPERTIES_FLAG_READABLE- See Also:
-
PROPERTIES_FLAG_WRITEABLE
public static final int PROPERTIES_FLAG_WRITEABLE- See Also:
-
-
Method Details
-
setMaxRecordLength
public static void setMaxRecordLength(int length) - Parameters:
length- the max record length allowed for PropertiesChunk
-
getMaxRecordLength
public static int getMaxRecordLength()- Returns:
- the max record length allowed for PropertiesChunk
-
getEntryName
Description copied from class:ChunkCreates a string to use to identify this chunk in the POI file system object.- Overrides:
getEntryNamein classChunk
-
getRawProperties
Returns all the properties in the chunk, without looking up any chunk-based values -
getProperties
Returns all the properties in the chunk, along with their values.
Any chunk-based values will be looked up and returned as such
-
setProperty
Defines a property. Multi-valued properties are not yet supported. -
getValues
Returns all values for the given property, looking up chunk based ones as required, of null if none exist -
getRawValue
Returns the value / pointer to the value chunk of the property, or null if none exists -
writeProperties
Writes this chunk in the specifiedDirectoryEntry.- Parameters:
directory- The directory.- Throws:
IOException- If an I/O error occurs.
-