public final class ASN1PrintableString extends ASN1Element
| 构造器和说明 |
|---|
ASN1PrintableString(byte type,
String stringValue)
Creates a new ASN.1 printable string element with the specified BER type
and the provided value.
|
ASN1PrintableString(String stringValue)
Creates a new ASN.1 printable string element with the default BER type and
the provided value.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static ASN1PrintableString |
decodeAsPrintableString(ASN1Element element)
Decodes the provided ASN.1 element as a printable string element.
|
static ASN1PrintableString |
decodeAsPrintableString(byte[] elementBytes)
Decodes the contents of the provided byte array as a printable string
element.
|
static boolean |
isPrintableString(byte[] b)
Indicates whether the contents of the provided byte array represent a
printable LDAP string, as per RFC 4517 section 3.2.
|
String |
stringValue()
Retrieves the string value for this element.
|
void |
toString(StringBuilder buffer)
Appends a string representation of the value for this ASN.1 element to the
provided buffer.
|
decode, decodeAsBigInteger, decodeAsBitString, decodeAsBoolean, decodeAsEnumerated, decodeAsGeneralizedTime, decodeAsIA5String, decodeAsInteger, decodeAsLong, decodeAsNull, decodeAsNumericString, decodeAsObjectIdentifier, decodeAsOctetString, decodeAsPrintableString, decodeAsSequence, decodeAsSet, decodeAsUTCTime, decodeAsUTF8String, encode, encodeLength, encodeTo, equals, equalsIgnoreType, getType, getTypeClass, getValue, getValueLength, hashCode, isConstructed, readFrom, readFrom, toString, writeTopublic ASN1PrintableString(@Nullable String stringValue) throws ASN1Exception
stringValue - The string value to use for this element. It may be
null or empty if the value should be empty.
It must only contain characters allowed in printable
strings.ASN1Exception - If the provided string does not represent a valid
printable string.public ASN1PrintableString(byte type,
@Nullable
String stringValue)
throws ASN1Exception
type - The BER type for this element.stringValue - The string value to use for this element. It may be
null or empty if the value should be empty.
It must only contain characters allowed in printable
strings.ASN1Exception - If the provided string does not represent a valid
printable string.@NonNull public String stringValue()
@NonNull public static ASN1PrintableString decodeAsPrintableString(@NonNull byte[] elementBytes) throws ASN1Exception
elementBytes - The byte array to decode as an ASN.1 printable string
element.ASN1Exception - If the provided array cannot be decoded as a
printable string element.@NonNull public static ASN1PrintableString decodeAsPrintableString(@NonNull ASN1Element element) throws ASN1Exception
element - The ASN.1 element to be decoded.ASN1Exception - If the provided element cannot be decoded as a
printable string element.public static boolean isPrintableString(@NonNull byte[] b)
b - The byte array for which to make the determination. It must
not be null.true if the contents of the provided byte array represent
a printable LDAP string, or false if not.public void toString(@NonNull StringBuilder buffer)
toString 在类中 ASN1Elementbuffer - The buffer to which to append the information.Copyright © 2022. All rights reserved.