Class IA5StringConverter
- java.lang.Object
-
- org.mozilla.jss.netscape.security.x509.IA5StringConverter
-
- All Implemented Interfaces:
AVAValueConverter
public class IA5StringConverter extends java.lang.Object implements 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:
AVAValueConverter
-
-
Constructor Summary
Constructors Constructor Description IA5StringConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAsString(DerValue avaValue)
Converts a DER encoded value to a string, not encoded in any form.DerValue
getValue(byte[] berStream)
Converts a BER encoded value to a DER encoded attribute value.DerValue
getValue(java.lang.String valueString)
Converts a string to a DER encoded attribute value.DerValue
getValue(java.lang.String valueString, byte[] tags)
Converts a string to a DER encoded attribute value.
-
-
-
Method Detail
-
getValue
public DerValue getValue(java.lang.String valueString) throws java.io.IOException
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:
java.io.IOException
- if an error occurs during the conversion.
-
getValue
public DerValue getValue(java.lang.String valueString, byte[] tags) throws java.io.IOException
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:
java.io.IOException
- if an error occurs during the conversion.
-
getValue
public DerValue getValue(byte[] berStream) throws java.io.IOException
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:
java.io.IOException
-
getAsString
public java.lang.String getAsString(DerValue avaValue) throws java.io.IOException
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:
java.io.IOException
- if an error occurs during the conversion.
-
-