- All Superinterfaces:
AlgorithmMethod
,XMLStructure
- All Known Subinterfaces:
CanonicalizationMethod
- All Known Implementing Classes:
TransformService
A representation of the XML
Transform
element as
defined in the
W3C Recommendation for XML-Signature Syntax and Processing.
The XML Schema Definition is defined as:
<element name="Transform" type="ds:TransformType"/> <complexType name="TransformType" mixed="true"> <choice minOccurs="0" maxOccurs="unbounded"> <any namespace="##other" processContents="lax"/> <!-- (1,1) elements from (0,unbounded) namespaces --> <element name="XPath" type="string"/> </choice> <attribute name="Algorithm" type="anyURI" use="required"/> </complexType>A
Transform
instance may be created by invoking the
newTransform
method
of the XMLSignatureFactory
class.- Since:
- 1.6
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The Base64 transform algorithm URI.static final String
The Enveloped Signature transform algorithm URI.static final String
The XPath transform algorithm URI.static final String
The XPath Filter 2 transform algorithm URI.static final String
The XSLT transform algorithm URI. -
Method Summary
Modifier and TypeMethodDescriptionReturns the algorithm-specific input parameters associated with thisTransform
.transform
(Data data, XMLCryptoContext context) Transforms the specified data using the underlying transform algorithm.transform
(Data data, XMLCryptoContext context, OutputStream os) Transforms the specified data using the underlying transform algorithm.Methods declared in interface javax.xml.crypto.AlgorithmMethod
getAlgorithm
Methods declared in interface javax.xml.crypto.XMLStructure
isFeatureSupported
-
Field Details
-
BASE64
-
ENVELOPED
-
XPATH
-
XPATH2
-
XSLT
-
-
Method Details
-
getParameterSpec
AlgorithmParameterSpec getParameterSpec()Returns the algorithm-specific input parameters associated with thisTransform
.The returned parameters can be typecast to a
TransformParameterSpec
object.- Specified by:
getParameterSpec
in interfaceAlgorithmMethod
- Returns:
- the algorithm-specific input parameters (may be
null
if not specified)
-
transform
Transforms the specified data using the underlying transform algorithm.- Parameters:
data
- the data to be transformedcontext
- theXMLCryptoContext
containing additional context (may benull
if not applicable)- Returns:
- the transformed data
- Throws:
NullPointerException
- ifdata
isnull
TransformException
- if an error occurs while executing the transform
-
transform
Transforms the specified data using the underlying transform algorithm. If the output of this transform is anOctetStreamData
, then this method returnsnull
and the bytes are written to the specifiedOutputStream
. Otherwise, theOutputStream
is ignored and the method behaves as iftransform(Data, XMLCryptoContext)
were invoked.- Parameters:
data
- the data to be transformedcontext
- 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 (or
null
if the data was written to theOutputStream
parameter) - Throws:
NullPointerException
- ifdata
oros
isnull
TransformException
- if an error occurs while executing the transform
-