当前位置: 首页>>代码示例>>Java>>正文


Java ExcC14NParameterSpec.getPrefixList方法代码示例

本文整理汇总了Java中javax.xml.crypto.dsig.spec.ExcC14NParameterSpec.getPrefixList方法的典型用法代码示例。如果您正苦于以下问题:Java ExcC14NParameterSpec.getPrefixList方法的具体用法?Java ExcC14NParameterSpec.getPrefixList怎么用?Java ExcC14NParameterSpec.getPrefixList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.xml.crypto.dsig.spec.ExcC14NParameterSpec的用法示例。


在下文中一共展示了ExcC14NParameterSpec.getPrefixList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: marshalParams

import javax.xml.crypto.dsig.spec.ExcC14NParameterSpec; //导入方法依赖的package包/类
public void marshalParams(XMLStructure parent, XMLCryptoContext context)
    throws MarshalException
{
    super.marshalParams(parent, context);
    AlgorithmParameterSpec spec = getParameterSpec();
    if (spec == null) {
        return;
    }

    String prefix = DOMUtils.getNSPrefix(context,
                                         CanonicalizationMethod.EXCLUSIVE);
    Element eElem = DOMUtils.createElement(ownerDoc,
                                           "InclusiveNamespaces",
                                           CanonicalizationMethod.EXCLUSIVE,
                                           prefix);
    if (prefix == null || prefix.length() == 0) {
        eElem.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns",
                             CanonicalizationMethod.EXCLUSIVE);
    } else {
        eElem.setAttributeNS("http://www.w3.org/2000/xmlns/",
                               "xmlns:" + prefix,
                               CanonicalizationMethod.EXCLUSIVE);
    }

    ExcC14NParameterSpec params = (ExcC14NParameterSpec)spec;
    StringBuffer prefixListAttr = new StringBuffer("");
    @SuppressWarnings("unchecked")
    List<String> prefixList = params.getPrefixList();
    for (int i = 0, size = prefixList.size(); i < size; i++) {
        prefixListAttr.append(prefixList.get(i));
        if (i < size - 1) {
            prefixListAttr.append(" ");
        }
    }
    DOMUtils.setAttribute(eElem, "PrefixList", prefixListAttr.toString());
    this.inclusiveNamespaces = prefixListAttr.toString();
    transformElem.appendChild(eElem);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:39,代码来源:DOMExcC14NMethod.java

示例2: marshalParams

import javax.xml.crypto.dsig.spec.ExcC14NParameterSpec; //导入方法依赖的package包/类
public void marshalParams(XMLStructure parent, XMLCryptoContext context)
    throws MarshalException
{
    super.marshalParams(parent, context);
    AlgorithmParameterSpec spec = getParameterSpec();
    if (spec == null) {
        return;
    }

    String prefix = DOMUtils.getNSPrefix(context,
                                         CanonicalizationMethod.EXCLUSIVE);
    Element eElem = DOMUtils.createElement(ownerDoc,
                                           "InclusiveNamespaces",
                                           CanonicalizationMethod.EXCLUSIVE,
                                           prefix);
    if (prefix == null || prefix.length() == 0) {
        eElem.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns",
                             CanonicalizationMethod.EXCLUSIVE);
    } else {
        eElem.setAttributeNS("http://www.w3.org/2000/xmlns/",
                               "xmlns:" + prefix,
                               CanonicalizationMethod.EXCLUSIVE);
    }

    ExcC14NParameterSpec params = (ExcC14NParameterSpec)spec;
    StringBuilder prefixListAttr = new StringBuilder("");
    List<String> prefixList = params.getPrefixList();
    for (int i = 0, size = prefixList.size(); i < size; i++) {
        prefixListAttr.append(prefixList.get(i));
        if (i < size - 1) {
            prefixListAttr.append(" ");
        }
    }
    DOMUtils.setAttribute(eElem, "PrefixList", prefixListAttr.toString());
    this.inclusiveNamespaces = prefixListAttr.toString();
    transformElem.appendChild(eElem);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:38,代码来源:DOMExcC14NMethod.java

示例3: marshalParams

import javax.xml.crypto.dsig.spec.ExcC14NParameterSpec; //导入方法依赖的package包/类
public void marshalParams(XMLStructure parent, XMLCryptoContext context)
    throws MarshalException {

    super.marshalParams(parent, context);
    AlgorithmParameterSpec spec = getParameterSpec();
    if (spec == null) {
        return;
    }

    String prefix =
        DOMUtils.getNSPrefix(context, CanonicalizationMethod.EXCLUSIVE);
    Element excElem = DOMUtils.createElement
        (ownerDoc, "InclusiveNamespaces",
         CanonicalizationMethod.EXCLUSIVE, prefix);
    if (prefix == null || prefix.length() == 0) {
        excElem.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns",
            CanonicalizationMethod.EXCLUSIVE);
    } else {
        excElem.setAttributeNS("http://www.w3.org/2000/xmlns/",
            "xmlns:" + prefix, CanonicalizationMethod.EXCLUSIVE);
    }

    ExcC14NParameterSpec params = (ExcC14NParameterSpec) spec;
    StringBuffer prefixListAttr = new StringBuffer("");
    List prefixList = params.getPrefixList();
    for (int i = 0, size = prefixList.size(); i < size; i++) {
        prefixListAttr.append((String) prefixList.get(i));
        if (i < size - 1) {
            prefixListAttr.append(" ");
        }
    }
    DOMUtils.setAttribute(excElem, "PrefixList", prefixListAttr.toString());
    this.inclusiveNamespaces = prefixListAttr.toString();
    transformElem.appendChild(excElem);
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:36,代码来源:DOMExcC14NMethod.java

示例4: getParameterSpecPrefixList

import javax.xml.crypto.dsig.spec.ExcC14NParameterSpec; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public List<String> getParameterSpecPrefixList(ExcC14NParameterSpec paramSpec) {
    return paramSpec.getPrefixList();
}
 
开发者ID:Legostaev,项目名称:xmlsec-gost,代码行数:5,代码来源:DOMExcC14NMethod.java


注:本文中的javax.xml.crypto.dsig.spec.ExcC14NParameterSpec.getPrefixList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。