Class IA5StringConverter
java.lang.Object
org.mozilla.jss.netscape.security.x509.IA5StringConverter
- All Implemented Interfaces:
AVAValueConverter
A AVAValueConverter that converts a IA5String attribute to a DerValue
and vice versa. An example an attribute that is a IA5String string is "E".
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAsString
(DerValue avaValue) Converts a DER encoded value to a string, not encoded in any form.getValue
(byte[] berStream) Converts a BER encoded value to a DER encoded attribute value.Converts a string to a DER encoded attribute value.Converts a string to a DER encoded attribute value.
-
Constructor Details
-
IA5StringConverter
public IA5StringConverter()
-
-
Method Details
-
getValue
Description copied from interface:AVAValueConverter
Converts a string to a DER encoded attribute value.- Specified by:
getValue
in interfaceAVAValueConverter
- Parameters:
valueString
- An AVA value string not encoded in any form.- Returns:
- A DerValue object.
- Throws:
IOException
- if an error occurs during the conversion.
-
getValue
Description copied from interface:AVAValueConverter
Converts a string to a DER encoded attribute value. Specify the order of DER tags to use if more than one encoding is possible. Currently Directory Strings can have different order for backwards compatibility. By 2003 all should be UTF8String.- Specified by:
getValue
in interfaceAVAValueConverter
- Parameters:
valueString
- An AVA value string not encoded in any form.- Returns:
- A DerValue object.
- Throws:
IOException
- if an error occurs during the conversion.
-
getValue
Description copied from interface:AVAValueConverter
Converts a BER encoded value to a DER encoded attribute value.- Specified by:
getValue
in interfaceAVAValueConverter
- Parameters:
berStream
- A byte array of the BER encoded AVA value.- Returns:
- A DerValue object.
- Throws:
IOException
-
getAsString
Description copied from interface:AVAValueConverter
Converts a DER encoded value to a string, not encoded in any form.- Specified by:
getAsString
in interfaceAVAValueConverter
- Parameters:
avaValue
- A DerValue object.- Returns:
- A string for the value or null if it can't be converted.
- Throws:
IOException
- if an error occurs during the conversion.
-