All Packages Class Hierarchy This Package Previous Next Index
Class netscape.security.x509.PrintableConverter
netscape.security.x509.PrintableConverter
- public class PrintableConverter
- implements AVAValueConverter
A AVAValueConverter that converts a Printable String attribute to a DerValue
and vice versa. An example an attribute that is a printable string is "C".
- See Also:
- ASN1CharStrConvMap, AVAValueConverter
-
PrintableConverter()
-
-
getAsString(DerValue)
- Converts a DerValue of PrintableString to a java string with
PrintableString characters.
-
getValue(byte[])
- Converts a BER encoded value of PrintableString to a DER encoded value.
-
getValue(String)
- Converts a string with ASN.1 Printable characters to a DerValue.
PrintableConverter
public PrintableConverter()
getValue
public DerValue getValue(String valueString) throws IOException
- Converts a string with ASN.1 Printable characters to a DerValue.
- Parameters:
- valueString - a string with Printable characters.
- Returns:
- a DerValue.
- Throws: IOException
- if a Printable CharToByteConverter is not
available for the conversion.
getValue
public DerValue getValue(byte berStream[]) throws IOException
- Converts a BER encoded value of PrintableString to a DER encoded value.
Checks if the BER encoded value is a PrintableString.
NOTE only DER encoded values are currently accepted on input.
- Parameters:
- berStream - A byte array of the BER encoded value.
- Returns:
- A DerValue.
- Throws: IOException
- if the BER value cannot be converted to a
PrintableString DER value.
getAsString
public String getAsString(DerValue avaValue) throws IOException
- Converts a DerValue of PrintableString to a java string with
PrintableString characters.
- Parameters:
- avaValue - a DerValue.
- Returns:
- a string with PrintableString characters.
- Throws: IOException
- if the DerValue is not a PrintableString i.e.
The DerValue cannot be converted to a string
with PrintableString characters.
All Packages Class Hierarchy This Package Previous Next Index