Class DOMTransform
java.lang.Object
org.apache.jcp.xml.dsig.internal.dom.DOMStructure
org.apache.jcp.xml.dsig.internal.dom.DOMTransform
- All Implemented Interfaces:
AlgorithmMethod
,Transform
,XMLStructure
- Direct Known Subclasses:
DOMCanonicalizationMethod
DOM-based abstract implementation of Transform.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates aDOMTransform
.DOMTransform
(Element transElem, XMLCryptoContext context, Provider provider) Creates aDOMTransform
from an element. -
Method Summary
Modifier and TypeMethodDescriptionboolean
final String
final AlgorithmParameterSpec
int
hashCode()
void
marshal
(Node parent, String dsPrefix, DOMCryptoContext context) This method marshals any algorithm-specific parameters.transform
(Data data, XMLCryptoContext xc) Transforms the specified data using the underlying transform algorithm.transform
(Data data, XMLCryptoContext xc, OutputStream os) Transforms the specified data using the underlying transform algorithm.(package private) Data
transform
(Data data, XMLCryptoContext xc, DOMSignContext context) Transforms the specified data using the underlying transform algorithm.Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.DOMStructure
isFeatureSupported
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 Details
-
spi
-
-
Constructor Details
-
DOMTransform
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 Details
-
getParameterSpec
- Specified by:
getParameterSpec
in interfaceAlgorithmMethod
- Specified by:
getParameterSpec
in interfaceTransform
-
getAlgorithm
- Specified by:
getAlgorithm
in interfaceAlgorithmMethod
-
marshal
This method marshals any algorithm-specific parameters.- Specified by:
marshal
in classDOMStructure
- Throws:
MarshalException
-
transform
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
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
-
equals
-
hashCode
public int hashCode() -
transform
Data transform(Data data, XMLCryptoContext xc, DOMSignContext context) throws MarshalException, TransformException Transforms the specified data using the underlying transform algorithm. This method invokes themarshal
method and passes it the specifiedDOMSignContext
before transforming the data.- Parameters:
data
- the data to be transformedxc
- theXMLCryptoContext
containing additional context (may benull
if not applicable)context
- the marshalling context- Returns:
- the transformed data
- Throws:
MarshalException
- if an exception occurs while marshallingNullPointerException
- ifdata
orcontext
isnull
XMLSignatureException
- if an unexpected error occurs while executing the transformTransformException
-