| Method from org.apache.cocoon.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 |
int getNextChildIndex() {
return _next_property.get();
}
|
public File getNextFile() {
return _next_file;
}
Get the next File, if any |
int getPreviousChildIndex() {
return _previous_property.get();
}
|
public File getPreviousFile() {
return _previous_file;
}
Get the previous File, if any |
public int getSize() {
return _size.get();
}
find out the document size |
public int getStartBlock() {
return _start_block.get();
}
|
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 |
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 setNextFile(File file) {
_next_file = file;
_next_property.set((file == null) ? _NO_INDEX
: (( Property ) file)
.getIndex(), _raw_data);
}
|
protected void setNodeColor(byte nodeColor) {
_node_color.set(nodeColor, _raw_data);
}
|
public void setPreviousFile(File file) {
_previous_file = file;
_previous_property.set((file == null) ? _NO_INDEX
: (( Property ) file)
.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 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. |