26 Mart 2008 Çarşamba

Java Asn1 Compiler (open source)

(download link : http://sourceforge.net/projects/jac-asn1/)

JAC, is an open source asn1 compiler that I have completed in 2 months during my internship at Turkcell Technology. It was the last 2 months of my internship (July-August, 2007).

JAC (Java Asn.1 Compiler)
is a tool to parse the asn.1 file, create .java classes of defined asn.1 data types and do encoding/decoding of instances of the generated java classes.
It is used in the end-to-end communications due to the asn.1 principles.

Before starting to develop the project I have searched and examined lots of open source compilers but a good free java asn.1 compiler that supports BER encoding was not available on the net. There were lots of open source compilers but they were not sufficient for our needs.

In the end of the internship, we gave my project the name "JAC (Java Asn1 Compiler)".
And I have hosted it on sourceforge.net as an open source project after getting the permission from Trukcell Technology.
The link of my project for download is here :


More About JAC - Java Asn.1 Compiler

JAC (Java Asn.1 Compiler)
is a tool for you if you want to
(1) parse your asn.1 file
(2) create .java classes of data types defined in your asn.1 file and
(3) do encoding/decoding of instances of your generated classes.
BER, CER and DER are all supported. Just download and start using immediately.
Just forget all asn1 byte streams, and take the advantage of OOP!

All generated java classes by JAC, have the followings inside:

Public member data variable(s) to hold data of the generated type.
Constructor(s) to initialize the object.
Set(..) Method to set the variables of the object.
• An encode(..) method to create asn.1 byte stream which is the output to send.
• A decode(..) method to create the java object from the received encoded input stream.
• A print(..) method to print the contents of the object.

So, JAC gives the opportunity to user working with Java objects instead of playing with complex asn.1 byte streams.
During encoding JAC writes a Java object to an output byte stream which is the encoded output before sending, and when decoding creates a Java object from the received byte stream which is the received encoded input, due to the principles of asn1 standards.

There are clear examples under the download package of my project about the term "asn.1" and asn.1 files.
In the Power Point document "JAC (Java ASN1 Compiler).ppt" there are good examples of how to create .java classes from asn.1 files and do encoding/decoding by use of JAC.
In this power point slide show you can find all features and capabilities of JAC.

And also note that, each new version information is specified in the file "Version.txt" file under the download package.

JAC class extension hierharchy is shown briefly on the figure below :

modified W.Woody's asn.1 library package

JAC's package

Created .java classes by JAC

Please feel free to contact me about the project (JAC - Java Asn1 Compiler).
Any questions, suggestions or comments will be welcomed.