Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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, ValueRepresentation

public class Base64BinaryValue
extends AtomicValue

A value of type xs:base64Binary

See Also:
  Serialized Form

Field Summary

Fields inherited from class net.sf.saxon.value.Value
`EMPTY_CLASS_ARRAY`

Fields inherited from interface net.sf.saxon.om.ValueRepresentation
`EMPTY_VALUE_ARRAY`

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 base64 encoding

Method Summary
`protected static int` | `byteArrayHashCode(byte[] value)`
`AtomicValue` | `convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)` Convert to target data type
`java.lang.Object` | `convertToJava(java.lang.Class target, 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(TypeHierarchy th)` 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()` Return a hash code to support the equals() function

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

Methods inherited from class net.sf.saxon.value.Value
`asItem, asIterator, asValue, collapseWhitespace, convert, convertJavaObjectToXPath, getDependencies, getIterator, getParentExpression, getSpecialProperties, itemAt, iterateSubExpressions, makeQNameValue, normalizeWhitespace, optimize, promote, reduce, simplify, stringToNumber, trimWhitespace, typeCheck`

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

Constructor Detail

### Base64BinaryValue

    public Base64BinaryValue(java.lang.CharSequence s)
                      throws XPathException

  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

### 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:
    `convertPrimitive` in class `AtomicValue`
  Parameters:
    `requiredType` - an integer identifying the required atomic type
    `context` -
    `validate` - 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.
  Returns:
    an AtomicValue, a value of the required type; or an ErrorValue

### 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(TypeHierarchy th)

  Determine the data type of the exprssion

  Specified by:
    `getItemType` in interface `Expression`
  Overrides:
    `getItemType` in class `Value`
  Parameters:
    `th` -
  Returns:
    Type.BASE64_BINARY_TYPE

### convertToJava

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

  Convert to Java object (for passing to external functions)

  Overrides:
    `convertToJava` in class `Value`
  Throws:
    `XPathException`

### equals

    public boolean equals(java.lang.Object other)

  Test if the two base64Binary values are equal.

  Overrides:
    `equals` in class `Value`

### hashCode

    public int hashCode()

  Description copied from class: `Value`
  Return a hash code to support the equals() function

  Overrides:
    `hashCode` in class `Value`

### byteArrayHashCode

    protected static int byteArrayHashCode(byte[] value)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD