Class HexBinaryValue

    • Constructor Detail

      • HexBinaryValue

        public HexBinaryValue​(java.lang.CharSequence in)
                       throws XPathException
        Constructor: create a hexBinary value from a supplied string, in which each octet is represented by a pair of values from 0-9, a-f, A-F
        Throws:
        XPathException
      • HexBinaryValue

        public HexBinaryValue​(byte[] value)
        Constructor: create a hexBinary value from a given array of bytes
    • Method Detail

      • getBinaryValue

        public byte[] getBinaryValue()
        Get the binary value
      • convertPrimitive

        public AtomicValue convertPrimitive​(BuiltInAtomicType requiredType,
                                            boolean validate,
                                            XPathContext context)
        Convert to target data type
        Specified by:
        convertPrimitive in class AtomicValue
        Parameters:
        requiredType - an integer identifying the required atomic type
        context -
        validate - true if validation is required. If set to false, the caller guarantees that the value is valid for the target data type, and that further validation is therefore not required. Note that a validation failure may be reported even if validation was not requested.
        Returns:
        an AtomicValue, a value of the required type; or an ErrorValue
      • getLengthInOctets

        public int getLengthInOctets()
        Get the number of octets in the value
      • equals

        public boolean equals​(java.lang.Object other)
        Test if the two hexBinary values are equal.
        Overrides:
        equals in class Value
      • hashCode

        public int hashCode()
        Description copied from class: Value
        Return a hash code to support the equals() function
        Overrides:
        hashCode in class Value