public class EscherArrayProperty extends EscherComplexProperty
Modifier and Type | Field and Description |
---|---|
private boolean |
emptyComplexPart
When reading a property from data stream remeber if the complex part is empty and set this flag.
|
private static int |
FIXED_SIZE
The size of the header that goes at the
start of the array, before the data
|
private boolean |
sizeIncludesHeaderSize
Normally, the size recorded in the simple data (for the complex
data) includes the size of the header.
|
complexData
id
Constructor and Description |
---|
EscherArrayProperty(short propertyNumber,
boolean isBlipId,
byte[] complexData) |
EscherArrayProperty(short id,
byte[] complexData) |
Modifier and Type | Method and Description |
---|---|
private static byte[] |
checkComplexData(byte[] complexData) |
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 |
serializeSimplePart(byte[] data,
int pos)
Serializes the simple part of this property.
|
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) |
String |
toString()
Retrieves the string representation for this property.
|
equals, getComplexData, getPropertySize, hashCode, serializeComplexPart
getId, getName, getPropertyNumber, isBlipId, isComplex
private static final int FIXED_SIZE
private boolean sizeIncludesHeaderSize
private boolean emptyComplexPart
public EscherArrayProperty(short id, byte[] complexData)
public EscherArrayProperty(short propertyNumber, boolean isBlipId, byte[] complexData)
private static byte[] checkComplexData(byte[] complexData)
public int getNumberOfElementsInArray()
public void setNumberOfElementsInArray(int numberOfElements)
public int getNumberOfElementsInMemory()
public void setNumberOfElementsInMemory(int numberOfElements)
public short getSizeOfElements()
public void setSizeOfElements(int sizeOfElements)
public byte[] getElement(int index)
public void setElement(int index, byte[] element)
public String toString()
EscherComplexProperty
toString
in class EscherComplexProperty
public int setArrayData(byte[] data, int offset)
data
- The data array containing the escher array informationoffset
- The offset into the array to start reading from.public int serializeSimplePart(byte[] data, int pos)
serializeSimplePart
in class EscherComplexProperty
public static int getActualSizeOfElements(short sizeOfElements)
Copyright © 2015 Open Microscopy Environment