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.
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME |
static int |
PROPERTIES_FLAG_READABLE |
static int |
PROPERTIES_FLAG_WRITEABLE |
static 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 |
|---|---|
String |
getEntryName()
Creates a string to use to identify this chunk in the POI file system
object.
|
static int |
getMaxRecordLength() |
Map<MAPIProperty,List<PropertyValue>> |
getProperties()
Returns all the properties in the chunk, along with their values.
|
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
|
List<PropertyValue> |
getValues(MAPIProperty property)
Returns all values for the given property, looking up chunk based ones as
required, of null if none exist
|
protected void |
matchVariableSizedPropertiesToChunks()
Called once the parent ChunkGroup has been populated, to match up the
Chunks in it with our Variable Sized Properties.
|
protected void |
readProperties(InputStream value) |
static void |
setMaxRecordLength(int length) |
void |
setProperty(PropertyValue value)
Defines a property.
|
protected void |
writeNodeData(DirectoryEntry directory,
List<PropertyValue> values)
Write the nodes for variable-length data.
|
protected List<PropertyValue> |
writePreCalculatedProperties(OutputStream out)
Writes the manually pre-calculated(have header and data written manually) properties.
|
void |
writeProperties(DirectoryEntry directory)
Writes this chunk in the specified
DirectoryEntry. |
protected List<PropertyValue> |
writeProperties(OutputStream out)
Writes the header of the properties.
|
getChunkId, getType, readValue, writeValuepublic static final String NAME
public static final String VARIABLE_LENGTH_PROPERTY_PREFIX
public static final int PROPERTIES_FLAG_READABLE
public static final int PROPERTIES_FLAG_WRITEABLE
protected PropertiesChunk(ChunkGroup parentGroup)
public static void setMaxRecordLength(int length)
length - the max record length allowed for PropertiesChunkpublic static int getMaxRecordLength()
public String getEntryName()
ChunkgetEntryName in class Chunkpublic Map<MAPIProperty,PropertyValue> getRawProperties()
public Map<MAPIProperty,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 List<PropertyValue> getValues(MAPIProperty property)
public PropertyValue getRawValue(MAPIProperty property)
protected void matchVariableSizedPropertiesToChunks()
protected void readProperties(InputStream value) throws IOException
IOExceptionpublic void writeProperties(DirectoryEntry directory) throws IOException
DirectoryEntry.directory - The directory.IOException - If an I/O error occurs.protected void writeNodeData(DirectoryEntry directory, List<PropertyValue> values) throws IOException
writeProperties(OutputStream).directory - The directory.values - The values.IOException - If an I/O error occurs.protected List<PropertyValue> writeProperties(OutputStream out) throws IOException
out - The OutputStream.IOException - If an I/O error occurs.protected List<PropertyValue> writePreCalculatedProperties(OutputStream out) throws IOException
out - The OutputStream.IOException - If an I/O error occurs.