本文整理汇总了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];
}
示例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));
}
}
示例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));
}
}
示例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];
}
示例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));
}
}
示例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));
}
}
示例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() + "\"");
}
}