net.sf.saxon.value
Class Base64BinaryValue

java.lang.Object
  extended bynet.sf.saxon.value.Value
      extended bynet.sf.saxon.value.AtomicValue
          extended bynet.sf.saxon.value.Base64BinaryValue
All Implemented Interfaces:
Expression, Item, java.io.Serializable

public class Base64BinaryValue
extends AtomicValue

A value of type xs:base64Binary

See Also:
Serialized Form

Constructor Summary
Base64BinaryValue(byte[] value)
          Constructor: create a base64Binary value from a given array of bytes
Base64BinaryValue(java.lang.CharSequence s)
          Constructor: create a base64Binary 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
 int conversionPreference(java.lang.Class required)
          Get conversion preference for this value to a Java class.
 AtomicValue convert(int requiredType)
          Convert to target data type
 java.lang.Object convertToJava(java.lang.Class target)
          Convert to Java object (for passing to external functions)
 void display(int level, NamePool pool)
          Diagnostic print of expression structure
 boolean equals(java.lang.Object other)
          Test if the two base64Binary values are equal.
 ItemType getItemType()
          Determine the data type of the exprssion
 java.lang.String getStringValue()
          Convert to string
 int hashCode()
           
 
Methods inherited from class net.sf.saxon.value.AtomicValue
convert, convert, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getComponent, getPrimitiveValue, getTypedValue, iterate
 
Methods inherited from class net.sf.saxon.value.Value
analyze, asItem, asValue, collapseWhitespace, getDependencies, getSpecialProperties, getSubExpressions, inverse, normalizeWhitespace, promote, simplify, stringToInteger, stringToNumber, trimWhitespace
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64BinaryValue

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


Base64BinaryValue

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

Method Detail

convert

public AtomicValue convert(int requiredType)
                    throws XPathException
Convert to target data type

Specified by:
convert in class AtomicValue
Parameters:
requiredType - an integer identifying the required atomic type
Returns:
an AtomicValue, a value of the required type
Throws:
XPathException - if the conversion is not possible

getStringValue

public java.lang.String getStringValue()
Convert to string

Returns:
the canonical representation.

getItemType

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

Returns:
Type.BASE64_BINARY_TYPE

conversionPreference

public int conversionPreference(java.lang.Class required)
Get conversion preference for this value to a Java class. A low result indicates higher preference.

Overrides:
conversionPreference in class AtomicValue

convertToJava

public java.lang.Object convertToJava(java.lang.Class target)
                               throws XPathException
Convert to Java object (for passing to external functions)

Overrides:
convertToJava in class AtomicValue
Throws:
XPathException

equals

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


hashCode

public int hashCode()

display

public void display(int level,
                    NamePool pool)
Diagnostic print of expression structure

Parameters:
level - indentation level for this expression