org.apache.xml.security.transforms.implementations
Class TransformBase64Decode

java.lang.Object
  |
  +--org.apache.xml.security.transforms.TransformSpi
        |
        +--org.apache.xml.security.transforms.implementations.TransformBase64Decode

public class TransformBase64Decode
extends TransformSpi

Implements the http://www.w3.org/2000/09/xmldsig#base64 decoding transform.

The normative specification for base64 decoding transforms is [MIME]. The base64 Transform element has no content. The input is decoded by the algorithms. This transform is useful if an application needs to sign the raw data associated with the encoded content of an element.

This transform requires an octet stream for input. If an XPath node-set (or sufficiently functional alternative) is given as input, then it is converted to an octet stream by performing operations logically equivalent to 1) applying an XPath transform with expression self::text(), then 2) taking the string-value of the node-set. Thus, if an XML element is identified by a barename XPointer in the Reference URI, and its content consists solely of base64 encoded character data, then this transform automatically strips away the start and end tags of the identified element and any of its descendant elements as well as any descendant comments and processing instructions. The output of this transform is an octet stream.

Author:
Christian Geuer-Pollmann
See Also:
Base64

Field Summary
static java.lang.String implementedTransformURI
          Field implementedTransformURI
 
Fields inherited from class org.apache.xml.security.transforms.TransformSpi
_transformObject
 
Constructor Summary
TransformBase64Decode()
           
 
Method Summary
protected  java.lang.String engineGetURI()
          Method engineGetURI
protected  XMLSignatureInput enginePerformTransform(XMLSignatureInput input)
          Method enginePerformTransform
 boolean returnsNodeSet()
          Tests whether Transform implemenation class will generate Node Set as output of result of Transformation
 boolean returnsOctetStream()
          Tests whether Transform implemenation class will generate Octect Stream as output of result of Transformation
 boolean wantsNodeSet()
          Tests whether Transform implemenation class is need Octect Stream as input of Transformation
 boolean wantsOctetStream()
          Tests whether Transform implemenation class is need Octect Stream as input of Transformation
 
Methods inherited from class org.apache.xml.security.transforms.TransformSpi
setTransform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

implementedTransformURI

public static final java.lang.String implementedTransformURI
Field implementedTransformURI

See Also:
Constant Field Values
Constructor Detail

TransformBase64Decode

public TransformBase64Decode()
Method Detail

engineGetURI

protected java.lang.String engineGetURI()
Method engineGetURI

Specified by:
engineGetURI in class TransformSpi
Returns:

wantsOctetStream

public boolean wantsOctetStream()
Description copied from class: TransformSpi
Tests whether Transform implemenation class is need Octect Stream as input of Transformation

Specified by:
wantsOctetStream in class TransformSpi
Returns:
true if need Octect Stream as input

wantsNodeSet

public boolean wantsNodeSet()
Description copied from class: TransformSpi
Tests whether Transform implemenation class is need Octect Stream as input of Transformation

Specified by:
wantsNodeSet in class TransformSpi
Returns:
true if need Node Set as input

returnsOctetStream

public boolean returnsOctetStream()
Description copied from class: TransformSpi
Tests whether Transform implemenation class will generate Octect Stream as output of result of Transformation

Specified by:
returnsOctetStream in class TransformSpi
Returns:
true if will returns Octect Stream as output

returnsNodeSet

public boolean returnsNodeSet()
Description copied from class: TransformSpi
Tests whether Transform implemenation class will generate Node Set as output of result of Transformation

Specified by:
returnsNodeSet in class TransformSpi
Returns:
true if will returns node set as output

enginePerformTransform

protected XMLSignatureInput enginePerformTransform(XMLSignatureInput input)
                                            throws java.io.IOException,
                                                   CanonicalizationException,
                                                   TransformationException,
                                                   InvalidCanonicalizerException
Method enginePerformTransform

Specified by:
enginePerformTransform in class TransformSpi
Parameters:
input -
Returns:
Throws:
CanonicalizationException
java.io.IOException
InvalidCanonicalizerException
TransformationException