public abstract class ApacheTransform extends TransformService
Modifier and Type | Field and Description |
---|---|
protected Document |
ownerDoc |
protected TransformParameterSpec |
params |
protected Element |
transformElem |
Constructor and Description |
---|
ApacheTransform() |
Modifier and Type | Method and Description |
---|---|
AlgorithmParameterSpec |
getParameterSpec()
Returns the algorithm-specific input parameters associated with this
Transform . |
void |
init(XMLStructure parent,
XMLCryptoContext context)
Initializes this
TransformService with the specified
parameters and document context. |
boolean |
isFeatureSupported(String feature)
Indicates whether a specified feature is supported.
|
void |
marshalParams(XMLStructure parent,
XMLCryptoContext context)
Marshals the 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.
|
getAlgorithm, getInstance, getInstance, getInstance, getMechanismType, getProvider, init
protected Document ownerDoc
protected Element transformElem
protected TransformParameterSpec params
public final AlgorithmParameterSpec getParameterSpec()
Transform
Transform
.
The returned parameters can be typecast to a
TransformParameterSpec
object.
null
if not specified)public void init(XMLStructure parent, XMLCryptoContext context) throws InvalidAlgorithmParameterException
TransformService
TransformService
with the specified
parameters and document context.init
in class TransformService
parent
- a mechanism-specific structure containing the parent
structurecontext
- the XMLCryptoContext
containing
additional context (may be null
if not applicable)InvalidAlgorithmParameterException
- if the specified parameters
are invalid for this algorithmpublic void marshalParams(XMLStructure parent, XMLCryptoContext context) throws MarshalException
TransformService
marshalParams
in class TransformService
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)MarshalException
- if the parameters cannot be marshalledpublic Data transform(Data data, XMLCryptoContext xc) throws TransformException
Transform
data
- the data to be transformedxc
- the XMLCryptoContext
containing
additional context (may be null
if not applicable)TransformException
- if an error occurs while executing the
transformpublic Data transform(Data data, XMLCryptoContext xc, OutputStream os) throws TransformException
Transform
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.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 tonull
if the data was
written to the OutputStream
parameter)TransformException
- if an error occurs while executing the
transformpublic final boolean isFeatureSupported(String feature)
XMLStructure
feature
- the feature name (as an absolute URI)true
if the specified feature is supported,
false
otherwiseCopyright © 2000–2017 The Apache Software Foundation. All rights reserved.