Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| XML Digital Signature and Encryption, 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.xml.crypto.dsig
Interface Transform

All Superinterfaces:
  AlgorithmMethod, XMLStructure

All Known Subinterfaces:
  CanonicalizationMethod

All Known Implementing Classes:
  TransformService

    public interface Transform

extends XMLStructure, AlgorithmMethod

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.

See Also:
  `XMLSignatureFactory.newTransform(String, TransformParameterSpec)`

Field Summary
`static java.lang.String` | `BASE64` The Base64 transform algorithm URI.
`static java.lang.String` | `ENVELOPED` The Enveloped Signature transform algorithm URI.
`static java.lang.String` | `XPATH` The XPath transform algorithm URI.
`static java.lang.String` | `XPATH2` The XPath Filter 2 transform algorithm URI.
`static java.lang.String` | `XSLT` The XSLT transform algorithm URI.

Method Summary
`java.security.spec.AlgorithmParameterSpec` | `getParameterSpec()` Returns the algorithm-specific input parameters associated with this `Transform`.
`Data` | `transform(Data data, XMLCryptoContext context)` Transforms the specified data using the underlying transform algorithm.
`Data` | `transform(Data data, XMLCryptoContext context, java.io.OutputStream os)` Transforms the specified data using the underlying transform algorithm.

Methods inherited from interface javax.xml.crypto.XMLStructure
`isFeatureSupported`

Methods inherited from interface javax.xml.crypto.AlgorithmMethod
`getAlgorithm`

Field Detail

### BASE64

    static final java.lang.String BASE64

  The Base64 transform algorithm URI.

  See Also:
    Constant Field Values

### ENVELOPED

    static final java.lang.String ENVELOPED

  The Enveloped Signature transform algorithm URI.

  See Also:
    Constant Field Values

### XPATH

    static final java.lang.String XPATH

  The XPath transform algorithm URI.

  See Also:
    Constant Field Values

### XPATH2

    static final java.lang.String XPATH2

  The XPath Filter 2 transform algorithm URI.

  See Also:
    Constant Field Values

### XSLT

    static final java.lang.String XSLT

  The XSLT transform algorithm URI.

  See Also:
    Constant Field Values

Method Detail

### getParameterSpec

    java.security.spec.AlgorithmParameterSpec getParameterSpec()

  Returns the algorithm-specific input parameters associated with this `Transform`.

  The returned parameters can be typecast to a `TransformParameterSpec` object.

  Specified by:
    `getParameterSpec` in interface `AlgorithmMethod`
  Returns:
    the algorithm-specific input parameters (may be `null` if not specified)

### transform

    Data transform(Data data,
                   XMLCryptoContext context)
                   throws TransformException

  Transforms the specified data using the underlying transform algorithm.

  Parameters:
    `data` - the data to be transformed
    `context` - the `XMLCryptoContext` containing additional context (may be `null` if not applicable)
  Returns:
    the transformed data
  Throws:
    `java.lang.NullPointerException` - if `data` is `null`
    `TransformException` - if an error occurs while executing the transform

### transform

    Data transform(Data data,
                   XMLCryptoContext context,
                   java.io.OutputStream os)
                   throws TransformException

  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(Data, XMLCryptoContext)` were invoked.

  Parameters:
    `data` - the data to be transformed
    `context` - 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:
    `java.lang.NullPointerException` - if `data` or `os` is `null`
    `TransformException` - if an error occurs while executing the transform

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| XML Digital Signature and Encryption, 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2004, IBM Corporation and Sun Microsystems, Inc. All rights reserved.
Please send comments to: jsr-106-comments@jcp.org