## net.sf.saxon.value
Class Base64BinaryValue

    java.lang.Object
      |
      +--net.sf.saxon.value.Value
            |
            +--net.sf.saxon.value.AtomicValue
                  |
                  +--net.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

Field Summary

Fields inherited from interface net.sf.saxon.expr.Expression
`EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD`

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
`protected static int` `byteArrayHashCode(byte[] value)`
`AtomicValue` `convert(int requiredType, XPathContext context)` Convert to target data type
`java.lang.Object` `convertToJava(java.lang.Class target, Configuration config, XPathContext context)` Convert to Java object (for passing to external functions)
`boolean` `equals(java.lang.Object other)` Test if the two base64Binary values are equal.
`byte[]` `getBinaryValue()` Get the binary value
`ItemType` `getItemType()` Determine the data type of the exprssion
`int` `getLengthInOctets()` Get the number of octets in the value
`java.lang.String` `getStringValue()` Convert to string
`int` `hashCode()`

Methods inherited from class net.sf.saxon.value.AtomicValue
`convert, display, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getComponent, getImplementationMethod, getPrimitiveValue, getTypedValue, iterate, process, toString`

Methods inherited from class net.sf.saxon.value.Value
`analyze, asItem, asValue, collapseWhitespace, convertJavaObjectToXPath, getDependencies, getParentExpression, getSpecialProperties, inverse, iterateSubExpressions, normalizeWhitespace, promote, simplify, stringToNumber, trimWhitespace`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Base64BinaryValue

    public 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

### Base64BinaryValue

    public Base64BinaryValue(byte[] value)

  Constructor: create a base64Binary value from a given array of bytes

Method Detail

### getBinaryValue

    public byte[] getBinaryValue()

  Get the binary value

### convert

    public AtomicValue convert(int requiredType,
                               XPathContext context)
                        throws XPathException

  Convert to target data type

  Specified by:
    `convert` in class `AtomicValue`
  Parameters:
    `requiredType` - an integer identifying the required atomic type
    `context` - the evaluation context. Used primarily for error reporting, since nearly all type conversions are context-independent. The value may be null if the context is not known.
  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

  Specified by:
    `getStringValue` in interface `Item`
  Specified by:
    `getStringValue` in class `AtomicValue`
  Returns:
    the canonical representation.

### getLengthInOctets

    public int getLengthInOctets()

  Get the number of octets in the value

### getItemType

    public ItemType getItemType()

  Determine the data type of the exprssion

  Returns:
    Type.BASE64_BINARY_TYPE

### convertToJava

    public java.lang.Object convertToJava(java.lang.Class target,
                                          Configuration config,
                                          XPathContext context)
                                   throws XPathException

  Convert to Java object (for passing to external functions)

  Overrides:
    `convertToJava` in class `AtomicValue`
  Parameters:
    `target` - The class required by the external function
    `config` - The configuration (needed for access to schema information)
  Returns:
    an object of the target class
    `XPathException`

### equals

    public boolean equals(java.lang.Object other)

  Test if the two base64Binary values are equal.

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### byteArrayHashCode

    protected static int byteArrayHashCode(byte[] value)