Class HexBinaryValue
java.lang.Object
net.sf.saxon.value.Value
net.sf.saxon.value.AtomicValue
net.sf.saxon.value.HexBinaryValue
- All Implemented Interfaces:
Serializable, Expression, Item, ValueRepresentation
-
Field Summary
Fields inherited from class Value
EMPTY_CLASS_ARRAYFields inherited from interface Expression
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHODFields inherited from interface ValueRepresentation
EMPTY_VALUE_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionHexBinaryValue(byte[] value) Constructor: create a hexBinary value from a given array of bytesConstructor: 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 -
Method Summary
Modifier and TypeMethodDescriptionconvertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context) Convert to target data typeconvertToJava(Class target, XPathContext context) Convert to Java object (for passing to external functions)booleanTest if the two hexBinary values are equal.byte[]Get the binary valueDetermine the data type of the exprssionintGet the number of octets in the valueConvert to stringinthashCode()Return a hash code to support the equals() functionMethods inherited from class AtomicValue
checkPermittedContents, convert, convert, display, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getComponent, getImplementationMethod, getLength, getPrimitiveValue, getStringValueCS, getTypedValue, hasBuiltInType, iterate, process, toStringMethods inherited from class Value
asItem, asIterator, asValue, convert, convertJavaObjectToXPath, getDependencies, getIterator, getParentExpression, getSpecialProperties, itemAt, iterateSubExpressions, makeQNameValue, optimize, promote, reduce, simplify, stringToNumber, typeCheck
-
Constructor Details
-
HexBinaryValue
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 Details
-
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:
convertPrimitivein classAtomicValue- Parameters:
requiredType- an integer identifying the required atomic typevalidate- 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.context-- Returns:
- an AtomicValue, a value of the required type; or an ErrorValue
-
getStringValue
Convert to string- Specified by:
getStringValuein interfaceItem- Specified by:
getStringValuein interfaceValueRepresentation- Specified by:
getStringValuein classAtomicValue- Returns:
- the canonical representation.
- See Also:
-
getItemType
Determine the data type of the exprssion- Specified by:
getItemTypein interfaceExpression- Overrides:
getItemTypein classValue- Parameters:
th-- Returns:
- Type.HEX_BINARY_TYPE
-
getLengthInOctets
public int getLengthInOctets()Get the number of octets in the value -
convertToJava
Convert to Java object (for passing to external functions)- Overrides:
convertToJavain classValue- Throws:
XPathException
-
equals
-
hashCode
-