code: public static ASN1Primitive toASN1Primitive(byte[] data)
              throws IOException {
          ByteArrayInputStream inStream = new ByteArrayInputStream(data);
          ASN1InputStream derInputStream = new ASN1InputStream(inStream);
          return derInputStream.readObject();
      }
docs: Converts the DER-encoded byte array into a <code>DERObject</code>.
  
  @param data the DER-encoded byte array to convert.
  @return the DERObject.
  @throws IOException if conversion fails