本文整理匯總了Java中javax.xml.crypto.dsig.dom.DOMSignContext.getParent方法的典型用法代碼示例。如果您正苦於以下問題:Java DOMSignContext.getParent方法的具體用法?Java DOMSignContext.getParent怎麽用?Java DOMSignContext.getParent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.xml.crypto.dsig.dom.DOMSignContext
的用法示例。
在下文中一共展示了DOMSignContext.getParent方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: transform
import javax.xml.crypto.dsig.dom.DOMSignContext; //導入方法依賴的package包/類
/**
* Transforms the specified data using the underlying transform algorithm.
* This method invokes the {@link #marshal marshal} method and passes it
* the specified <code>DOMSignContext</code> before transforming the data.
*
* @param data the data to be transformed
* @param sc the <code>XMLCryptoContext</code> containing
* additional context (may be <code>null</code> if not applicable)
* @param context the marshalling context
* @return the transformed data
* @throws MarshalException if an exception occurs while marshalling
* @throws NullPointerException if <code>data</code> or <code>context</code>
* is <code>null</code>
* @throws XMLSignatureException if an unexpected error occurs while
* executing the transform
*/
Data transform(Data data, XMLCryptoContext xc, DOMSignContext context)
throws MarshalException, TransformException
{
Node parent = context.getParent();
XmlWriter xwriter = new XmlWriterToTree(Marshaller.getMarshallers(), parent);
marshal(xwriter, DOMUtils.getSignaturePrefix(context), context);
return transform(data, xc);
}