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


Java I18n类代码示例

本文整理汇总了Java中com.sun.org.apache.xml.internal.security.utils.I18n的典型用法代码示例。如果您正苦于以下问题:Java I18n类的具体用法?Java I18n怎么用?Java I18n使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


I18n类属于com.sun.org.apache.xml.internal.security.utils包,在下文中一共展示了I18n类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getVerificationResult

import com.sun.org.apache.xml.internal.security.utils.I18n; //导入依赖的package包/类
/**
 * After verifying a {@link Manifest} or a {@link SignedInfo} using the
 * {@link Manifest#verifyReferences()} or {@link SignedInfo#verify()} methods,
 * the individual results can be retrieved with this method.
 *
 * @param index an index of into a {@link Manifest} or a {@link SignedInfo}
 * @return the results of reference validation at the specified index
 * @throws XMLSecurityException
 */
public boolean getVerificationResult(int index) throws XMLSecurityException {
    if ((index < 0) || (index > this.getLength() - 1)) {
        Object exArgs[] = { Integer.toString(index), Integer.toString(this.getLength()) };
        Exception e =
            new IndexOutOfBoundsException(
                I18n.translate("signature.Verification.IndexOutOfBounds", exArgs)
            );

        throw new XMLSecurityException("generic.EmptyMessage", e);
    }

    if (this.verificationResults == null) {
        try {
            this.verifyReferences();
        } catch (Exception ex) {
            throw new XMLSecurityException("generic.EmptyMessage", ex);
        }
    }

    return this.verificationResults[index];
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:31,代码来源:Manifest.java

示例2: RSAKeyValue

import com.sun.org.apache.xml.internal.security.utils.I18n; //导入依赖的package包/类
/**
 * Constructor RSAKeyValue
 *
 * @param doc
 * @param key
 * @throws IllegalArgumentException
 */
public RSAKeyValue(Document doc, Key key) throws IllegalArgumentException {
    super(doc);

    XMLUtils.addReturnToElement(this.constructionElement);

    if (key instanceof java.security.interfaces.RSAPublicKey ) {
        this.addBigIntegerElement(
            ((RSAPublicKey) key).getModulus(), Constants._TAG_MODULUS
        );
        this.addBigIntegerElement(
            ((RSAPublicKey) key).getPublicExponent(), Constants._TAG_EXPONENT
        );
    } else {
        Object exArgs[] = { Constants._TAG_RSAKEYVALUE, key.getClass().getName() };

        throw new IllegalArgumentException(I18n.translate("KeyValue.IllegalArgument", exArgs));
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:RSAKeyValue.java

示例3: DSAKeyValue

import com.sun.org.apache.xml.internal.security.utils.I18n; //导入依赖的package包/类
/**
 * Constructor DSAKeyValue
 *
 * @param doc
 * @param key
 * @throws IllegalArgumentException
 */
public DSAKeyValue(Document doc, Key key) throws IllegalArgumentException {
    super(doc);

    XMLUtils.addReturnToElement(this.constructionElement);

    if (key instanceof java.security.interfaces.DSAPublicKey) {
        this.addBigIntegerElement(((DSAPublicKey) key).getParams().getP(), Constants._TAG_P);
        this.addBigIntegerElement(((DSAPublicKey) key).getParams().getQ(), Constants._TAG_Q);
        this.addBigIntegerElement(((DSAPublicKey) key).getParams().getG(), Constants._TAG_G);
        this.addBigIntegerElement(((DSAPublicKey) key).getY(), Constants._TAG_Y);
    } else {
        Object exArgs[] = { Constants._TAG_DSAKEYVALUE, key.getClass().getName() };

        throw new IllegalArgumentException(I18n.translate("KeyValue.IllegalArgument", exArgs));
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:DSAKeyValue.java

示例4: getVerificationResult

import com.sun.org.apache.xml.internal.security.utils.I18n; //导入依赖的package包/类
/**
 * After verifying a {@link Manifest} or a {@link SignedInfo} using the
 * {@link Manifest#verifyReferences()} or {@link SignedInfo#verify()} methods,
 * the individual results can be retrieved with this method.
 *
 * @param index an index of into a {@link Manifest} or a {@link SignedInfo}
 * @return the results of reference validation at the specified index
 * @throws XMLSecurityException
 */
public boolean getVerificationResult(int index) throws XMLSecurityException {

   if ((index < 0) || (index > this.getLength() - 1)) {
      Object exArgs[] = { Integer.toString(index),
                          Integer.toString(this.getLength()) };
      Exception e =
         new IndexOutOfBoundsException(I18n
            .translate("signature.Verification.IndexOutOfBounds", exArgs));

      throw new XMLSecurityException("generic.EmptyMessage", e);
   }

   if (this.verificationResults == null) {
      try {
         this.verifyReferences();
      } catch (Exception ex) {
         throw new XMLSecurityException("generic.EmptyMessage", ex);
      }
   }

   return this.verificationResults[index];
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:32,代码来源:Manifest.java

示例5: RSAKeyValue

import com.sun.org.apache.xml.internal.security.utils.I18n; //导入依赖的package包/类
/**
 * Constructor RSAKeyValue
 *
 * @param doc
 * @param key
 * @throws IllegalArgumentException
 */
public RSAKeyValue(Document doc, Key key) throws IllegalArgumentException {

   super(doc);

   XMLUtils.addReturnToElement(this._constructionElement);

   if (key instanceof java.security.interfaces.RSAPublicKey ) {
      this.addBigIntegerElement(((RSAPublicKey) key).getModulus(),
                                Constants._TAG_MODULUS);
      this.addBigIntegerElement(((RSAPublicKey) key).getPublicExponent(),
                                Constants._TAG_EXPONENT);
   } else {
      Object exArgs[] = { Constants._TAG_RSAKEYVALUE,
                          key.getClass().getName() };

      throw new IllegalArgumentException(I18n
         .translate("KeyValue.IllegalArgument", exArgs));
   }
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:27,代码来源:RSAKeyValue.java

示例6: DSAKeyValue

import com.sun.org.apache.xml.internal.security.utils.I18n; //导入依赖的package包/类
/**
 * Constructor DSAKeyValue
 *
 * @param doc
 * @param key
 * @throws IllegalArgumentException
 */
public DSAKeyValue(Document doc, Key key) throws IllegalArgumentException {

   super(doc);

   XMLUtils.addReturnToElement(this._constructionElement);

   if (key instanceof java.security.interfaces.DSAPublicKey) {
      this.addBigIntegerElement(((DSAPublicKey) key).getParams().getP(),
                                Constants._TAG_P);
      this.addBigIntegerElement(((DSAPublicKey) key).getParams().getQ(),
                                Constants._TAG_Q);
      this.addBigIntegerElement(((DSAPublicKey) key).getParams().getG(),
                                Constants._TAG_G);
      this.addBigIntegerElement(((DSAPublicKey) key).getY(),
                                Constants._TAG_Y);
   } else {
      Object exArgs[] = { Constants._TAG_DSAKEYVALUE,
                          key.getClass().getName() };

      throw new IllegalArgumentException(I18n
         .translate("KeyValue.IllegalArgument", exArgs));
   }
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:31,代码来源:DSAKeyValue.java

示例7: FuncHereContext

import com.sun.org.apache.xml.internal.security.utils.I18n; //导入依赖的package包/类
/**
 * Constructor FuncHereContext
 *
 * @param owner
 * @param xpathContext
 */
public FuncHereContext(Node owner, XPathContext xpathContext) {

   super(owner);

   try {
      super.m_dtmManager = xpathContext.getDTMManager();
   } catch (IllegalAccessError iae) {
      throw new IllegalAccessError(I18n.translate("endorsed.jdk1.4.0")
                                   + " Original message was \""
                                   + iae.getMessage() + "\"");
   }
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:19,代码来源:FuncHereContext.java


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