All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface netscape.security.x509.AVAValueConverter

public interface AVAValueConverter
Interface for classes that convert a attribute value string to a DER encoded ASN.1 value and vice versa. The converters are associated with attribute types, such as directory string, ia5string, etc.

For example, to convert a string, such as an organization name for the "O" attribute to a DerValue, the "O" attribute is mapped to the DirStrConverter which is used to convert the organization name to a DER encoded Directory String which is a DerValue of a ASN.1 PrintableString, T.61String or UniversalString for the organization name.


Method Index

 o getAsString(DerValue)
Converts a DER encoded value to a string, not encoded in any form.
 o getValue(byte[])
Converts a BER encoded value to a DER encoded attribute value.
 o getValue(String)
Converts a string to a DER encoded attribute value.

Methods

 o getValue
 public abstract DerValue getValue(String valueString) throws IOException
Converts a string to a DER encoded attribute value.

Parameters:
valueString - An AVA value string not encoded in any form.
Returns:
A DerValue object.
Throws: IOException
if an error occurs during the conversion.
 o getValue
 public abstract DerValue getValue(byte berStream[]) throws IOException
Converts a BER encoded value to a DER encoded attribute value.

Parameters:
berStream - A byte array of the BER encoded AVA value.
Returns:
A DerValue object.
 o getAsString
 public abstract String getAsString(DerValue avaValue) throws IOException
Converts a DER encoded value to a string, not encoded in any form.

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.

All Packages  Class Hierarchy  This Package  Previous  Next  Index