TOC PREV NEXT INDEX


Character String Types



The Java version of the compiler contains support for the various ASN.1 character string types including the BMP, Universal and UTF-8 string types. All character strings in Java are based on 16-bit Unicode characters except for UniversalString which is based on a 32-bit character set.

All character string types are derived from the Asn1CharString base class (except the UniversalString). This class contains the following public member variable that holds the character string contents:

	public String value;
 

Each of the specific ASN.1 character string types except UniversalString has an associated Java class that is derived from the Asn1CharString base class. The general form of the Java class name for each of the ASN.1 string types is Asn1 followed by the ASN.1 string type name. For example, IA5String is represented by the Asn1IA5String class, NumericString by the Asn1NumericString, etc.

The UniversalString associated Java class is derived from Asn1Type and it contains the following public member that holds the character string contents:

	public int value[];
 

The following shows the basic mapping from ASN.1 type to Java class definition:

ASN.1 Production:
<name> ::= <CharStrType>


 
Generated Java class:

public class <name> extends Asn1<CharStrType> {
 
   public <name> () {
 
      super();
 
   }
 
   public <name> (String value_) {
 
      super (value_);
 
   }
 
}


 





Objective Systems, Inc.

102 Pickering Way, Suite #506
Exton, Pennsylvania 19341
http://www.obj-sys.com
Phone: (484) 875-9841
Toll-free: (877) 307-6855 (US only)
Fax: (484) 875-9830
info@obj-sys.com
TOC PREV NEXT INDEX

Copyright © 1997-2004 Objective Systems,Inc.
All Rights Reserved.


This document may be distributed in any form, electronic
or otherwise, provided that it is distributed in its entirety
and that the copyright and this notice are included.