本文整理了Java中org.bouncycastle.asn1.DERPrintableString.isPrintableString()
方法的一些代码示例,展示了DERPrintableString.isPrintableString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DERPrintableString.isPrintableString()
方法的具体详情如下:
包路径:org.bouncycastle.asn1.DERPrintableString
类名称:DERPrintableString
方法名:isPrintableString
[英]return true if the passed in String can be represented without loss as a PrintableString, false otherwise.
[中]如果传入的字符串可以表示为可打印字符串而不会丢失,则返回true,否则返回false。
代码示例来源:origin: redfish64/TinyTravelTracker
/**
* return true if the passed in String can be represented without
* loss as a PrintableString, false otherwise.
*/
protected boolean canBePrintable(
String str)
{
return DERPrintableString.isPrintableString(str);
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
/**
* return true if the passed in String can be represented without
* loss as a PrintableString, false otherwise.
*/
protected boolean canBePrintable(
String str)
{
return DERPrintableString.isPrintableString(str);
}
代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on
/**
* Constructor with optional validation.
*
* @param string the base string to wrap.
* @param validate whether or not to check the string.
* @throws IllegalArgumentException if validate is true and the string
* contains characters that should not be in a PrintableString.
*/
public DERPrintableString(
String string,
boolean validate)
{
if (validate && !isPrintableString(string))
{
throw new IllegalArgumentException("string contains illegal characters");
}
this.string = Strings.toByteArray(string);
}
代码示例来源:origin: redfish64/TinyTravelTracker
/**
* Constructor with optional validation.
*
* @param string the base string to wrap.
* @param validate whether or not to check the string.
* @throws IllegalArgumentException if validate is true and the string
* contains characters that should not be in a PrintableString.
*/
public DERPrintableString(
String string,
boolean validate)
{
if (validate && !isPrintableString(string))
{
throw new IllegalArgumentException("string contains illegal characters");
}
this.string = Strings.toByteArray(string);
}
内容来源于网络,如有侵权,请联系作者删除!