public class PrintableConverter extends java.lang.Object implements AVAValueConverter
ASN1CharStrConvMap
,
AVAValueConverter
Constructor and Description |
---|
PrintableConverter() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAsString(DerValue avaValue)
Converts a DerValue of PrintableString to a java string with
PrintableString characters.
|
DerValue |
getValue(byte[] berStream)
Converts a BER encoded value of PrintableString to a DER encoded value.
|
DerValue |
getValue(java.lang.String valueString)
Converts a string with ASN.1 Printable characters to a DerValue.
|
DerValue |
getValue(java.lang.String valueString,
byte[] tags)
Converts a string to a DER encoded attribute value.
|
public DerValue getValue(java.lang.String valueString) throws java.io.IOException
getValue
in interface AVAValueConverter
valueString
- a string with Printable characters.java.io.IOException
- if a Printable encoder is not
available for the conversion.public DerValue getValue(java.lang.String valueString, byte[] tags) throws java.io.IOException
AVAValueConverter
getValue
in interface AVAValueConverter
valueString
- An AVA value string not encoded in any form.java.io.IOException
- if an error occurs during the conversion.public DerValue getValue(byte[] berStream) throws java.io.IOException
getValue
in interface AVAValueConverter
berStream
- A byte array of the BER encoded value.java.io.IOException
- if the BER value cannot be converted to a
PrintableString DER value.public java.lang.String getAsString(DerValue avaValue) throws java.io.IOException
getAsString
in interface AVAValueConverter
avaValue
- a DerValue.java.io.IOException
- if the DerValue is not a PrintableString i.e.
The DerValue cannot be converted to a string
with PrintableString characters.