Package net.sf.saxon.value
Class HexBinaryValue
java.lang.Object
net.sf.saxon.value.AtomicValue
net.sf.saxon.value.BinaryValue
net.sf.saxon.value.HexBinaryValue
- All Implemented Interfaces:
Comparable<XPathComparable>,Iterable<AtomicValue>,AtomicMatchKey,XPathComparable,AtomicSequence,GroundedValue,IdentityComparable,Item,Sequence,ConversionResult
A value of type xs:hexBinary
-
Field Summary
Fields inherited from class net.sf.saxon.value.BinaryValue
binaryValueFields inherited from class net.sf.saxon.value.AtomicValue
metadata -
Constructor Summary
ConstructorsConstructorDescriptionHexBinaryValue(byte[] value) Constructor: create a hexBinary value from a given array of bytesHexBinaryValue(byte[] value, AtomicMetadata typeLabel) Constructor: create a hexBinary value from a given array of bytes and a specified type labelConstructor: 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 TypeMethodDescriptionConvert to stringDetermine the primitive type of the value.withMetadata(AtomicMetadata metadata) Create a primitive copy of this atomic value (usually so that the type label can be changed).Methods inherited from class net.sf.saxon.value.BinaryValue
asMapKey, byteArrayHashCode, compareTo, equals, getBinaryValue, getLengthInOctets, getXPathComparable, getXPathMatchKey, hashCode, startsWithMethods inherited from class net.sf.saxon.value.AtomicValue
asAtomic, atomize, checkPermittedContents, checkValidInJavascript, effectiveBooleanValue, getCanonicalLexicalRepresentation, getCardinality, getComponent, getGenre, getItemType, getLabel, getLength, getUnicodeStringValue, getUType, head, identityHashCode, isIdentical, isIdentical, isNaN, isUntypedAtomic, itemAt, iterate, iterator, show, toShortString, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.sf.saxon.expr.sort.AtomicMatchKey
asAtomic, longHashCodeMethods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, materializeMethods inherited from interface net.sf.saxon.om.Item
getStringValue, isStreamed, reduce, subsequenceMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
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- Parameters:
in- character representation of the hexBinary value- Throws:
XPathException- if the input is invalid
-
HexBinaryValue
public HexBinaryValue(byte[] value) Constructor: create a hexBinary value from a given array of bytes- Parameters:
value- the value as an array of bytes
-
HexBinaryValue
Constructor: create a hexBinary value from a given array of bytes and a specified type label- Parameters:
value- the value as an array of bytestypeLabel- the type label, which must be a subtype of HEX_BINARY
-
-
Method Details
-
withMetadata
Create a primitive copy of this atomic value (usually so that the type label can be changed).- Specified by:
withMetadatain classAtomicValue- Parameters:
metadata- the target type (a derived type from hexBinary)- Returns:
- the copied value
-
getPrimitiveType
Determine the primitive type of the value. This delivers the same answer as getItemType().getPrimitiveItemType(). The primitive types are the 19 primitive types of XML Schema, plus xs:integer, xs:dayTimeDuration and xs:yearMonthDuration, and xs:untypedAtomic. For external objects, the result is AnyAtomicType.- Specified by:
getPrimitiveTypein classAtomicValue- Returns:
- the primitive type
-
getPrimitiveStringValue
Convert to string- Specified by:
getPrimitiveStringValuein classAtomicValue- Returns:
- the canonical representation.
-