All Packages Class Hierarchy This Package Previous Next Index
Class netscape.security.util.ASN1CharStrConvMap
netscape.security.util.ASN1CharStrConvMap
- public class ASN1CharStrConvMap
Maps a ASN.1 character string type to a CharToByte and ByteToChar converter.
The converter is used to convert a DerValue of a ASN.1 character string type
from bytes to unicode characters and vice versa.
A global default ASN1CharStrConvMap is created when the class is
initialized. The global default map is extensible.
-
ASN1CharStrConvMap()
- Constructs a ASN1CharStrConvMap.
-
addEntry(byte, Class, Class)
- Add a tag-CharToByteConverter-ByteToCharConverter entry in the map.
-
getBCC(byte)
- Get a Byte to Character converter for the given DER tag.
-
getCBC(byte)
- Get a Character to Byte converter for the specified DER tag.
-
getDefault()
- Get the global ASN1CharStrConvMap.
-
getTags()
- Get and enumeration of all tags in the map.
-
setDefault(ASN1CharStrConvMap)
- Set the global default ASN1CharStrConvMap.
ASN1CharStrConvMap
public ASN1CharStrConvMap()
- Constructs a ASN1CharStrConvMap.
getCBC
public CharToByteConverter getCBC(byte tag) throws IllegalAccessException, InstantiationException
- Get a Character to Byte converter for the specified DER tag.
- Parameters:
- tag - A DER tag of a ASN.1 character string type,
for example DerValue.tag_PrintableString.
- Returns:
- A CharToByteConverter for the DER tag.
- Throws: InstantiationException
- if error occurs when instantiating the CharToByteConverter.
- Throws: IllegalAccessException
- if error occurs when loading the CharToByteConverter class.
getBCC
public ByteToCharConverter getBCC(byte tag) throws IllegalAccessException, InstantiationException
- Get a Byte to Character converter for the given DER tag.
- Parameters:
- tag - A DER tag of a ASN.1 character string type,
for example DerValue.tag_PrintableString.
- Returns:
- A ByteToCharConverter for the DER tag.
- Throws: InstantiationException
- if error occurs when instantiationg the ByteToCharConverter.
- Throws: IllegalAccessException
- if error occurs when loading the ByteToCharConverter class.
addEntry
public void addEntry(byte tag,
Class cbc,
Class bcc)
- Add a tag-CharToByteConverter-ByteToCharConverter entry in the map.
- Parameters:
- tag - A DER tag of a ASN.1 character string type,
ex. DerValue.tag_IA5String
- cbc - A CharToByteConverter for the tag.
- bcc - A ByteToCharConverter for the tag.
getTags
public Enumeration getTags()
- Get and enumeration of all tags in the map.
- Returns:
- An Enumeration of DER tags in the map as Bytes.
getDefault
public static ASN1CharStrConvMap getDefault()
- Get the global ASN1CharStrConvMap.
- Returns:
- The global default ASN1CharStrConvMap.
setDefault
public static void setDefault(ASN1CharStrConvMap newDefault)
- Set the global default ASN1CharStrConvMap.
- Parameters:
- newDefault - The new default ASN1CharStrConvMap.
All Packages Class Hierarchy This Package Previous Next Index