net.sf.saxon.value

Class Base64BinaryValue

public class Base64BinaryValue extends AtomicValue

A value of type xs:base64Binary
Constructor Summary
Base64BinaryValue(CharSequence s)
Constructor: create a base64Binary value from a supplied string in base64 encoding
Base64BinaryValue(byte[] value)
Constructor: create a base64Binary value from a given array of bytes
Method Summary
protected static intbyteArrayHashCode(byte[] value)
AtomicValueconvertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)
Convert to target data type
ObjectconvertToJava(Class target, XPathContext context)
Convert to Java object (for passing to external functions)
booleanequals(Object other)
Test if the two base64Binary values are equal.
byte[]getBinaryValue()
Get the binary value
ItemTypegetItemType(TypeHierarchy th)
Determine the data type of the exprssion
intgetLengthInOctets()
Get the number of octets in the value
StringgetStringValue()
Convert to string
inthashCode()

Constructor Detail

Base64BinaryValue

public Base64BinaryValue(CharSequence s)
Constructor: create a base64Binary value from a supplied string in base64 encoding

Base64BinaryValue

public Base64BinaryValue(byte[] value)
Constructor: create a base64Binary value from a given array of bytes

Method Detail

byteArrayHashCode

protected static int byteArrayHashCode(byte[] value)

convertPrimitive

public AtomicValue convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)
Convert to target data type

Parameters: requiredType an integer identifying the required atomic type context

Returns: an AtomicValue, a value of the required type; or an ErrorValue

convertToJava

public Object convertToJava(Class target, XPathContext context)
Convert to Java object (for passing to external functions)

equals

public boolean equals(Object other)
Test if the two base64Binary values are equal.

getBinaryValue

public byte[] getBinaryValue()
Get the binary value

getItemType

public ItemType getItemType(TypeHierarchy th)
Determine the data type of the exprssion

Parameters: th

Returns: Type.BASE64_BINARY_TYPE

getLengthInOctets

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

getStringValue

public String getStringValue()
Convert to string

Returns: the canonical representation.

hashCode

public int hashCode()