title: ASN.1 file parser / Compiler using java
body: <p>I am new to ASN.1 syntax and what i want is a ASN.1 compiler which parse the ASN.1 syntax and generate <strong>.java</strong> files. I googled for the same thing and got few solution but thous are not working well (Or they are capable of parsing very specific syntax and generate java files) </p>
  
  <ol>
  <li><a href="https://www.openmuc.org/index.php?id=20" rel="nofollow">This link is working for some extent</a></li>
  <li><a href="http://bnotes.sourceforge.net/#download" rel="nofollow">This link is capable of generating few files</a></li>
  </ol>
  
  <p>Is there any source which parse advanced syntax Or all the content of ASN.1 and generate java files..?</p>
  
  <p><strong>How i suspect above links are working for some extent</strong> ?</p>
  
  <p>First i checked whether ASN.1 file is proper / valid by using <a href="http://asn1-playground.oss.com/" rel="nofollow">ASN.1 play ground ( OSS Nokalva)</a>, then by using above source code i have parsed ASN.1 file and able to generate around <strong>195 files</strong>.</p>
  
  <p>But the generated files are having some error like few of them didn't contain encode / decode method, some java classes are extended with other supper classes which are not generated at all (Even though ASN.1 file contain a description about thous supper classes).</p>
  
  <p>So, by using same ASN.1 file and with the help of <a href="http://lionet.info/asn1c/asn1c.cgi" rel="nofollow">this site</a> i have generated <strong>C</strong> files then it generated around <strong>456 files [228 are header files and 228 are .c files]</strong> which contain all the non generated supper class files of java with proper encode / decode method with value can be set using constructors.</p>
  
  <p>i have gone through <a href="http://www.bouncycastle.org/java.html" rel="nofollow">Bouncy Castle</a> but i didn't find any clue about parsing ASN.1 file to generate java files.</p>
  
  <p>But after gone through few links i felt <strong>Bouncy Castle</strong> is a algorithm based java code to encode / decode the string values and more specifically Bouncy castle is a API which strongly support for encryption / decryption for security purpose like creating SSL and it also include ASN.1 syntax support, it provide high end Interfaces / Classes like BER/PER/DER etc. parser but we need to write the supporting classes by referring ASN.1 syntax and there is no proper information / clue / white paper. so far i have <a href="http://www.bitpapers.com/2012/04/bouncy-castle-asn1-api.html" rel="nofollow">this link</a> to work with Bouncy Castle (If i am wrong pleas make me understand). </p>
  
  <p><strong>Why i want to generate java files..?</strong></p>
  
  <p>I already have Encoded files (CDRs) which encoded using ASN.1 file syntax, so if i get java files then i can decode thous files to get required information.</p>
  
  <p>____________________________Or____________________________________</p>
  
  <p>How can i write my own JAVA Encode / Decode methods by referring ASN.1 syntax file and with the help of Bouncy Castle API.</p>
  
  <p>So far i have not seen any open source example / code snippets which demonstrate the way of mapping / writing / simple example to create encode or decode methods in java using ASN.1 syntax file.</p>
  
  <p>any help will be appreciated, Thanks. </p>