Class EscherSimpleProperty

    • Constructor Summary

      Constructors 
      Constructor Description
      EscherSimpleProperty​(short propertyNumber, boolean isComplex, boolean isBlipId, int propertyValue)
      Constructs a new escher property.
      EscherSimpleProperty​(short id, int propertyValue)
      The id is distinct from the actual property number.
    • Constructor Detail

      • EscherSimpleProperty

        public EscherSimpleProperty​(short id,
                                    int propertyValue)
        The id is distinct from the actual property number. The id includes the property number the blip id flag and an indicator whether the property is complex or not.
        Parameters:
        id - the property id
        propertyValue - the property value
      • EscherSimpleProperty

        public EscherSimpleProperty​(short propertyNumber,
                                    boolean isComplex,
                                    boolean isBlipId,
                                    int propertyValue)
        Constructs a new escher property. The three parameters are combined to form a property id.
        Parameters:
        propertyNumber - the property number
        isComplex - true, if its a complex property
        isBlipId - true, if its a blip
        propertyValue - the property value
    • Method Detail

      • serializeSimplePart

        public int serializeSimplePart​(byte[] data,
                                       int offset)
        Serialize the simple part of the escher record.
        Specified by:
        serializeSimplePart in class EscherProperty
        Parameters:
        data - the buffer to write to
        offset - the starting position
        Returns:
        the number of bytes serialized.
      • serializeComplexPart

        public int serializeComplexPart​(byte[] data,
                                        int pos)
        Escher properties consist of a simple fixed length part and a complex variable length part. The fixed length part is serialized first.
        Specified by:
        serializeComplexPart in class EscherProperty
        Parameters:
        data - the buffer to write to
        pos - the starting position
        Returns:
        the length of the part
      • getPropertyValue

        public int getPropertyValue()
        Returns:
        Return the 32 bit value of this property.
      • equals

        public boolean equals​(java.lang.Object o)
        Returns true if one escher property is equal to another.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Returns a hashcode so that this object can be stored in collections that require the use of such things.
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Specified by:
        toString in class EscherProperty
        Returns:
        the string representation of this property.
      • toXml

        public java.lang.String toXml​(java.lang.String tab)
        Overrides:
        toXml in class EscherProperty