ASN.1 Tools for Java — Details

ASN.1/Java Compiler

You can have it all - speed, flexibility, and a rich feature set. The OSS ASN.1/Java Compiler accepts one or more input files, each containing one or more ASN.1 modules. The OSS ASN.1/Java compiler is a compiled (not interpreted) executable, therefore capable of extremely fast ASN.1 compilation. The compiler verifies the ASN.1 specification and generates: informative diagnostic messages, Java classes for inclusion in your application, optional XSL stylesheets and/or DTD for XML encodings, and an optional ASN.1 output listing. The OSS ASN.1/Java compiler and runtime support ASN.1:1990, including all macros, as well as ASN.1:2002, ASN.1:2008, ASN.1:2015, and ASN.1:2021 including full support for contents constraints.

No matter what your application needs, a little or a lot, OSS provides it. The OSS compiler's features include generation of:

  • a simple directory structure.
  • Java instantiations of all ASN.1 values.
  • informative diagnostic messages for any invalid ASN.1. The OSS compiler makes every attempt to recover from errors. Giving you messages for each error encountered means fewer recompilations to correct an invalid spec.
  • only the Java classes (based on the ASN.1 types) that you select - modules, PDUs, metadata (i.e. tags, names, constraints). Your application is leaner, thus your development time is reduced.
  • all of what you do need. Our ASN.1/Java compiler is comprehensive - not a tag or constraint is left behind.

Does your application need to do automatic decoding? Handle multiple ASN.1 versions? Work in a multi-threading environment? Does your spec contain values, extensible types and information object sets? Then you need the full featured OSS compiler. It generates valid Java code no matter what spec you use (RRC, S1/X2, RANAP, NBAP are just a few of the specs that our customers use that our compiler handles with no problem).

Special features enable the OSS compiler to:

  • handle even the most unusual ASN.1 specifications that strain the JVM compiler limits.
  • work with third party IDEs such as emacs and Microsoft Visual Studio.
  • automate the sample application process enabling you to try out our tools quickly with a minimum of effort.
  • generate a batch or script file to facilitate Java compilation.


The encoder/decoder consists of a class called Coder, of which the essential methods are encode() and decode().

TLV Print Utility

This utility included with the ASN.1 Tools for Java takes a BER or DER encoding in ASCII or binary format from an input file and writes it to an output file in one of three different type-length-value (TLV) formats.

Encode() takes data placed by your application program in the compiler-generated Java classes, and converts it to a string of bytes encoded according to BER, PER (aligned or unaligned), CPER, OER, COER, DER, CER, XER, CXER, E-XER, or JSON. The decode() method takes a string of bytes that have been encoded according to BER, PER, OER, COER, DER, CER, XER, CXER, E-XER, or JSON and performs the inverse operation of the encoder, resulting in a Java object that you can easily manipulate.

More Functionality
  • Powerful, flexible diagnostic and recovery capabilities
  • Methods for copying, and comparing decoded messages
  • Convenient mechanism for printing values of any type: System.out.println(value)
  • Custom printing capabilities - print it your way!
  • Dynamically extend extensible information object sets
  • Convert to/from binary/hex format
  • Debug BER encodings (OSSTLV)
  • Debug PER encodings (ASN1-Step)
  • JIA API - a way to access data values without knowing the type of the data
Java Interpretive ASN.1 API

The Java Interpretive ASN.1 API (IAAPI) is a collection of Java classes included with the ASN.1 Tools for Java. The Java IAAPI provides access to the ASN.1 type, subtype and value notation via an easy to use interface. This allows applications to create and encode data using ASN.1 without any foreknowledge of the structure of the data, such as the number of components and their types. It also allows messages (PDUs) to be decoded, and the components of the messages to be accessed, based on their data types.

Standards Conformance

For a list of the ASN.1 standards that the OSS ASN. Tools for Java conforms to, see the Standards Conformance page.

Quick Links


More information about how to create, compile and link your ASN.1 application using the ASN.1/Java Tools.

Free Trial

Download the ASN.1/Java Tools today!

24x7 Tech Support


We are here: 24 hours a day, 7 days a week.

  • Phone: 1-888-OSS-2761 (USA and Canada)
  • Phone: 1-732-302-9669 (International)
  • Fax: 1-732-302-0023
  • Email:

Quickly receive answers to your support questions.