Class DOMTransform
- java.lang.Object
-
- org.apache.jcp.xml.dsig.internal.dom.BaseStructure
-
- org.apache.jcp.xml.dsig.internal.dom.DOMTransform
-
- All Implemented Interfaces:
AlgorithmMethod
,Transform
,XMLStructure
- Direct Known Subclasses:
DOMCanonicalizationMethod
public class DOMTransform extends BaseStructure implements Transform
DOM-based abstract implementation of Transform.- Author:
- Sean Mullan
-
-
Constructor Summary
Constructors Constructor Description DOMTransform(TransformService spi)
Creates aDOMTransform
.DOMTransform(Element transElem, XMLCryptoContext context, Provider provider)
Creates aDOMTransform
from an element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getAlgorithm()
AlgorithmParameterSpec
getParameterSpec()
int
hashCode()
void
marshal(XmlWriter xwriter, String dsPrefix, XMLCryptoContext context)
This method marshals any algorithm-specific parameters.Data
transform(Data data, XMLCryptoContext xc)
Transforms the specified data using the underlying transform algorithm.Data
transform(Data data, XMLCryptoContext xc, OutputStream os)
Transforms the specified data using the underlying transform algorithm.-
Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.BaseStructure
isFeatureSupported, textOfNode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.xml.crypto.XMLStructure
isFeatureSupported
-
-
-
-
Field Detail
-
spi
protected TransformService spi
-
-
Constructor Detail
-
DOMTransform
public DOMTransform(TransformService spi)
Creates aDOMTransform
.- Parameters:
spi
- the TransformService
-
DOMTransform
public DOMTransform(Element transElem, XMLCryptoContext context, Provider provider) throws MarshalException
Creates aDOMTransform
from an element. It unmarshals any algorithm-specific input parameters.- Parameters:
transElem
- a Transform element- Throws:
MarshalException
-
-
Method Detail
-
getParameterSpec
public final AlgorithmParameterSpec getParameterSpec()
- Specified by:
getParameterSpec
in interfaceAlgorithmMethod
- Specified by:
getParameterSpec
in interfaceTransform
-
getAlgorithm
public final String getAlgorithm()
- Specified by:
getAlgorithm
in interfaceAlgorithmMethod
-
marshal
public void marshal(XmlWriter xwriter, String dsPrefix, XMLCryptoContext context) throws MarshalException
This method marshals any algorithm-specific parameters.- Throws:
MarshalException
-
transform
public Data transform(Data data, XMLCryptoContext xc) throws TransformException
Transforms the specified data using the underlying transform algorithm.- Specified by:
transform
in interfaceTransform
- Parameters:
data
- the data to be transformedxc
- theXMLCryptoContext
containing additional context (may benull
if not applicable)- Returns:
- the transformed data
- Throws:
NullPointerException
- ifdata
isnull
XMLSignatureException
- if an unexpected error occurs while executing the transformTransformException
-
transform
public Data transform(Data data, XMLCryptoContext xc, OutputStream os) throws TransformException
Transforms the specified data using the underlying transform algorithm.- Specified by:
transform
in interfaceTransform
- Parameters:
data
- the data to be transformedxc
- theXMLCryptoContext
containing additional context (may benull
if not applicable)os
- theOutputStream
that should be used to write the transformed data to- Returns:
- the transformed data
- Throws:
NullPointerException
- ifdata
isnull
XMLSignatureException
- if an unexpected error occurs while executing the transformTransformException
-
-