| Method from org.apache.poi.poifs.property.Property Detail: |
protected int getChildIndex() {
return _child_property.get();
}
Get the child property (its index in the Property Table) |
protected int getIndex() {
return _index;
}
get the index for this Property |
public String getName() {
return _name;
}
Get the name of this property |
public Child getNextChild() {
return _next_child;
}
Get the next Child, if any |
int getNextChildIndex() {
return _next_property.get();
}
|
public Child getPreviousChild() {
return _previous_child;
}
Get the previous Child, if any |
int getPreviousChildIndex() {
return _previous_property.get();
}
|
public String getShortDescription() {
StringBuffer buffer = new StringBuffer();
buffer.append("Property: \"").append(getName()).append("\"");
return buffer.toString();
}
Provides a short description of the object, to be used when a
POIFSViewable object has not provided its contents. |
public int getSize() {
return _size.get();
}
find out the document size |
public int getStartBlock() {
return _start_block.get();
}
|
public ClassID getStorageClsid() {
return _storage_clsid;
}
Sets the storage clsid, which is the Class ID of a COM object which
reads and writes this stream |
public Object[] getViewableArray() {
Object[] results = new Object[ 5 ];
results[ 0 ] = "Name = \"" + getName() + "\"";
results[ 1 ] = "Property Type = " + _property_type.get();
results[ 2 ] = "Node Color = " + _node_color.get();
long time = _days_1.get();
time < < = 32;
time += (( long ) _seconds_1.get()) & 0x0000FFFFL;
results[ 3 ] = "Time 1 = " + time;
time = _days_2.get();
time < < = 32;
time += (( long ) _seconds_2.get()) & 0x0000FFFFL;
results[ 4 ] = "Time 2 = " + time;
return results;
}
Get an array of objects, some of which may implement
POIFSViewable |
public Iterator getViewableIterator() {
return Collections.EMPTY_LIST.iterator();
}
Get an Iterator of objects, some of which may implement
POIFSViewable |
abstract public boolean isDirectory()
|
public static boolean isSmall(int length) {
return length < _big_block_minimum_bytes;
}
does the length indicate a small document? |
static boolean isValidIndex(int index) {
return index != _NO_INDEX;
}
determine whether the specified index is valid |
abstract protected void preWrite()
Perform whatever activities need to be performed prior to
writing |
public boolean preferArray() {
return true;
}
Give viewers a hint as to whether to call getViewableArray or
getViewableIterator |
protected void setChildProperty(int child) {
_child_property.set(child, _raw_data);
}
|
protected void setIndex(int index) {
_index = index;
}
Set the index for this Property |
protected final void setName(String name) {
char[] char_array = name.toCharArray();
int limit = Math.min(char_array.length, _max_name_length);
_name = new String(char_array, 0, limit);
short offset = 0;
int j = 0;
for (; j < limit; j++)
{
new ShortField(offset, ( short ) char_array[ j ], _raw_data);
offset += LittleEndianConsts.SHORT_SIZE;
}
for (; j < _max_name_length + 1; j++)
{
new ShortField(offset, ( short ) 0, _raw_data);
offset += LittleEndianConsts.SHORT_SIZE;
}
// double the count, and include the null at the end
_name_size
.set(( short ) ((limit + 1)
* LittleEndianConsts.SHORT_SIZE), _raw_data);
}
Set the name; silently truncates the name if it's too long. |
public void setNextChild(Child child) {
_next_child = child;
_next_property.set((child == null) ? _NO_INDEX
: (( Property ) child)
.getIndex(), _raw_data);
}
|
protected void setNodeColor(byte nodeColor) {
_node_color.set(nodeColor, _raw_data);
}
|
public void setPreviousChild(Child child) {
_previous_child = child;
_previous_property.set((child == null) ? _NO_INDEX
: (( Property ) child)
.getIndex(), _raw_data);
}
|
protected void setPropertyType(byte propertyType) {
_property_type.set(propertyType, _raw_data);
}
Set the property type. Makes no attempt to validate the value. |
protected void setSize(int size) {
_size.set(size, _raw_data);
}
Set the size of the document associated with this Property |
public void setStartBlock(int startBlock) {
_start_block.set(startBlock, _raw_data);
}
Set the start block for the document referred to by this
Property. |
public void setStorageClsid(ClassID clsidStorage) {
_storage_clsid = clsidStorage;
if( clsidStorage == null) {
Arrays.fill( _raw_data, _storage_clsid_offset, _storage_clsid_offset + ClassID.LENGTH, (byte) 0);
} else {
clsidStorage.write( _raw_data, _storage_clsid_offset);
}
}
Sets the storage class ID for this property stream. This is the Class ID
of the COM object which can read and write this property stream |
public boolean shouldUseSmallBlocks() {
return Property.isSmall(_size.get());
}
Based on the currently defined size, should this property use
small blocks? |
public void writeData(OutputStream stream) throws IOException {
stream.write(_raw_data);
}
Write the raw data to an OutputStream. |