org.apache.poi.ddf
Class EscherArrayProperty

java.lang.Object
  extended byorg.apache.poi.ddf.EscherProperty
      extended byorg.apache.poi.ddf.EscherComplexProperty
          extended byorg.apache.poi.ddf.EscherArrayProperty

public class EscherArrayProperty
extends EscherComplexProperty

Escher array properties are the most wierd construction ever invented with all sorts of special cases. I'm hopeful I've got them all.

Author:
Glen Stampoultzis (glens at superlinksoftware.com)

Constructor Summary
EscherArrayProperty(short propertyNumber, boolean isBlipId, byte[] complexData)
           
EscherArrayProperty(short id, byte[] complexData)
           
 
Method Summary
static int getActualSizeOfElements(short sizeOfElements)
          Sometimes the element size is stored as a negative number.
 byte[] getElement(int index)
           
 int getNumberOfElementsInArray()
           
 int getNumberOfElementsInMemory()
           
 short getSizeOfElements()
           
 int setArrayData(byte[] data, int offset)
          We have this method because the way in which arrays in escher works is screwed for seemly arbitary reasons.
 void setElement(int index, byte[] element)
           
 void setNumberOfElementsInArray(int numberOfElements)
           
 void setNumberOfElementsInMemory(int numberOfElements)
           
 void setSizeOfElements(int sizeOfElements)
           
 java.lang.String toString()
          Retrieves the string representation for this property.
 
Methods inherited from class org.apache.poi.ddf.EscherComplexProperty
equals, getComplexData, getPropertySize, hashCode, serializeComplexPart, serializeSimplePart
 
Methods inherited from class org.apache.poi.ddf.EscherProperty
getId, getName, getPropertyNumber, isBlipId, isComplex
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EscherArrayProperty

public EscherArrayProperty(short id,
                           byte[] complexData)

EscherArrayProperty

public EscherArrayProperty(short propertyNumber,
                           boolean isBlipId,
                           byte[] complexData)
Method Detail

getNumberOfElementsInArray

public int getNumberOfElementsInArray()

setNumberOfElementsInArray

public void setNumberOfElementsInArray(int numberOfElements)

getNumberOfElementsInMemory

public int getNumberOfElementsInMemory()

setNumberOfElementsInMemory

public void setNumberOfElementsInMemory(int numberOfElements)

getSizeOfElements

public short getSizeOfElements()

setSizeOfElements

public void setSizeOfElements(int sizeOfElements)

getElement

public byte[] getElement(int index)

setElement

public void setElement(int index,
                       byte[] element)

toString

public java.lang.String toString()
Description copied from class: EscherComplexProperty
Retrieves the string representation for this property.

Overrides:
toString in class EscherComplexProperty

setArrayData

public int setArrayData(byte[] data,
                        int offset)
We have this method because the way in which arrays in escher works is screwed for seemly arbitary reasons. While most properties are fairly consistent and have a predictable array size, escher arrays have special cases.

Parameters:
data - The data array containing the escher array information
offset - The offset into the array to start reading from.
Returns:
the number of bytes used by this complex property.

getActualSizeOfElements

public static int getActualSizeOfElements(short sizeOfElements)
Sometimes the element size is stored as a negative number. We negate it and shift it to get the real value.



Copyright © 2003 Apache Software Foundation.