Objective Systemís ASN1C compiler quickly and reliably translates ASN.1 and/or XML schema (XSD) source specifications into Java source code. Developers can use this code to translate structures/objects to and from finished ASN.1 messages using any of the encoding rules (BER, CER, DER, PER or XER).

The generated Java code consists of a series of Java source files - one for each production (type) defined within an ASN.1 specification. Each of these Java files contains (at a minimum) the following items:
  • A public member data variable (or variables) to hold data of the generated type.
  • A constructor (or constructors) to initialize the variable.
  • An encode method.
  • A decode method.
  • A print method to print the contents of the object to a given output stream.

There is also a run-time library for Java. This consists of a series of classes for encoding and decoding the primitive ASN.1 types. For example, the Asn1Integer class will encode or decode a variable of the ASN.1 INTEGER type. The compiler will extend these base classes to form higher level types derived directly from the base types, or assemble a series of these lower level objects to form constructed types (SEQUENCE, for example).

Generation of C# code is very similar to the Java generation described above. A separate C# class is generated for each production defined in an ASN.1 specification. This contains constructors and methods for encoding and decoding an instance of the class using any of the ASN.1 encoding rules.

Java or C# embedded development kits are available which support the Java MicroEdition (J2ME) or C# compact edition libraries.

ASN1C is a full-featured ASN.1 compiler capable of generating BER/DER/CER, PER (aligned/unaligned), and XML encoders and decoders in C, C++, C#, and Java. ASN.1 / XML Software Tools from Objective Systems