| |
|
| java.lang.Object org.apache.poi.hpsf.Section
All known Subclasses: org.apache.poi.hpsf.MutableSection,
Inner Class :class PropertyListEntry implements Comparable | |
Constructor Summary | |
protected | Section() Creates an empty and uninitialized
Section . | public | Section(byte[] src, int offset) |
dictionary | protected Map dictionary(Code) | | Maps property IDs to section-private PID strings. These
strings can be found in the property with ID 0.
|
Section | protected Section()(Code) | | Creates an empty and uninitialized
Section .
|
Section | public Section(byte[] src, int offset) throws UnsupportedEncodingException(Code) | | Creates a
Section instance from a byte array.
Parameters: src - Contains the complete property set stream. Parameters: offset - The position in the stream that points to thesection's format ID. exception: UnsupportedEncodingException - if the section's codepage is notsupported. |
equals | public boolean equals(Object o)(Code) | | Checks whether this section is equal to another object. The result is
false if one of the the following conditions holds:
The other object is not a
Section .
The format IDs of the two sections are not equal.
The sections have a different number of properties. However,
properties with ID 1 (codepage) are not counted.
The other object is not a
Section .
The properties have different values. The order of the properties
is irrelevant.
Parameters: o - The object to compare this section with true if the objects are equal, false ifnot |
getCodepage | public int getCodepage()(Code) | | Gets the section's codepage, if any.
The section's codepage if one is defined, else -1. |
getDictionary | public Map getDictionary()(Code) | | Gets the section's dictionary. A dictionary allows an application to
use human-readable property names instead of numeric property IDs. It
contains mappings from property IDs to their associated string
values. The dictionary is stored as the property with ID 0. The codepage
for the strings in the dictionary is defined by property with ID 1.
the dictionary or null if the section does not havea dictionary. |
getFormatID | public ClassID getFormatID()(Code) | | Returns the format ID. The format ID is the "type" of the
section. For example, if the format ID of the first
Section contains the bytes specified by
org.apache.poi.hpsf.wellknown.SectionIDMap.SUMMARY_INFORMATION_ID
the section (and thus the property set) is a SummaryInformation.
The format ID |
getOffset | public long getOffset()(Code) | | Returns the offset of the section in the stream.
The offset of the section in the stream. |
getPIDString | public String getPIDString(long pid)(Code) | | Returns the PID string associated with a property ID. The ID
is first looked up in the
Section 's private
dictionary. If it is not found there, the method calls
SectionIDMap.getPIDString .
Parameters: pid - The property ID The property ID's string value |
getProperties | public Property[] getProperties()(Code) | | Returns this section's properties.
This section's properties. |
getProperty | public Object getProperty(long id)(Code) | | Returns the value of the property with the specified ID. If
the property is not available, null is returned
and a subsequent call to
Section.wasNull will return
true .
Parameters: id - The property's ID The property's value |
getPropertyBooleanValue | protected boolean getPropertyBooleanValue(int id)(Code) | | Returns the value of the boolean property with the specified
ID. If the property is not available, false is
returned. A subsequent call to
Section.wasNull will return
true to let the caller distinguish that case from
a real property value of false .
Parameters: id - The property's ID The property's value |
getPropertyCount | public int getPropertyCount()(Code) | | Returns the number of properties in this section.
The number of properties in this section. |
getPropertyIntValue | protected int getPropertyIntValue(long id)(Code) | | Returns the value of the numeric property with the specified
ID. If the property is not available, 0 is returned. A
subsequent call to
Section.wasNull will return
true to let the caller distinguish that case from
a real property value of 0.
Parameters: id - The property's ID The property's value |
getSize | public int getSize()(Code) | | Returns the section's size in bytes.
The section's size in bytes. |
|
|
|