org.apache.jcp.xml.dsig.internal.dom
Class ApacheCanonicalizer
java.lang.Object
javax.xml.crypto.dsig.TransformService
org.apache.jcp.xml.dsig.internal.dom.ApacheCanonicalizer
- All Implemented Interfaces:
- AlgorithmMethod, Transform, XMLStructure
- Direct Known Subclasses:
- DOMCanonicalXMLC14N11Method, DOMCanonicalXMLC14NMethod, DOMExcC14NMethod
public abstract class ApacheCanonicalizer
- extends TransformService
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
apacheCanonicalizer
protected Canonicalizer apacheCanonicalizer
inclusiveNamespaces
protected String inclusiveNamespaces
params
protected C14NMethodParameterSpec params
ownerDoc
protected Document ownerDoc
transformElem
protected Element transformElem
ApacheCanonicalizer
public ApacheCanonicalizer()
getParameterSpec
public final AlgorithmParameterSpec getParameterSpec()
- Description copied from interface:
Transform
- Returns the algorithm-specific input parameters associated with this
Transform
.
The returned parameters can be typecast to a
TransformParameterSpec
object.
- Returns:
- the algorithm-specific input parameters (may be
null
if not specified)
init
public void init(XMLStructure parent,
XMLCryptoContext context)
throws InvalidAlgorithmParameterException
- Description copied from class:
TransformService
- Initializes this
TransformService
with the specified
parameters and document context.
- Specified by:
init
in class TransformService
- Parameters:
parent
- a mechanism-specific structure containing the parent
structurecontext
- the XMLCryptoContext
containing
additional context (may be null
if not applicable)
- Throws:
InvalidAlgorithmParameterException
- if the specified parameters
are invalid for this algorithm
marshalParams
public void marshalParams(XMLStructure parent,
XMLCryptoContext context)
throws MarshalException
- Description copied from class:
TransformService
- Marshals the algorithm-specific parameters. If there are no parameters
to be marshalled, this method returns without throwing an exception.
- Specified by:
marshalParams
in class TransformService
- Parameters:
parent
- a mechanism-specific structure containing the parent
node that the marshalled parameters should be appended tocontext
- the XMLCryptoContext
containing
additional context (may be null
if not applicable)
- Throws:
MarshalException
- if the parameters cannot be marshalled
canonicalize
public Data canonicalize(Data data,
XMLCryptoContext xc)
throws TransformException
- Throws:
TransformException
canonicalize
public Data canonicalize(Data data,
XMLCryptoContext xc,
OutputStream os)
throws TransformException
- Throws:
TransformException
transform
public Data transform(Data data,
XMLCryptoContext xc,
OutputStream os)
throws TransformException
- Description copied from interface:
Transform
- Transforms the specified data using the underlying transform algorithm.
If the output of this transform is an
OctetStreamData
, then
this method returns null
and the bytes are written to the
specified OutputStream
. Otherwise, the
OutputStream
is ignored and the method behaves as if
Transform.transform(Data, XMLCryptoContext)
were invoked.
- Parameters:
data
- the data to be transformedxc
- the XMLCryptoContext
containing
additional context (may be null
if not applicable)os
- the OutputStream
that should be used to write
the transformed data to
- Returns:
- the transformed data (or
null
if the data was
written to the OutputStream
parameter)
- Throws:
TransformException
- if an error occurs while executing the
transform
isFeatureSupported
public final boolean isFeatureSupported(String feature)
- Description copied from interface:
XMLStructure
- Indicates whether a specified feature is supported.
- Parameters:
feature
- the feature name (as an absolute URI)
- Returns:
true
if the specified feature is supported,
false
otherwise
Copyright © 2000–2013 The Apache Software Foundation. All rights reserved.