title: asn1 file creation giving error for big file size
body: <p>I am creating asn1 format file with file name,file content type and filedata when ever i import big  size file it is giving error of java heap space.</p>
  
  <pre><code>ASN1EncodableVector seq = new ASN1EncodableVector(); 
  seq.add(new DERTaggedObject(false, 0, new DERSequence(new DERUTF8String(new File(filePath).getName())))); 
  
    seq.add(new DERTaggedObject(false, 1, new DERSequence(new DERUTF8String(fileContentType))));
          seq.add(new DEROctetString(fileDataInBytes));
          ASN1InputStream tempstream=new ASN1InputStream(new ByteArrayInputStream(bytesArray));
          ASN1Sequence seq1=(ASN1Sequence)tempstream.readObject();
          seq.add((ASN1Encodable) seq1);
     byte[] filebytes= new DERSequence(seq).getEncoded();//On this line i am getting error of heap size
    FileUtils.writeByteArrayToFile(new File(fileName) , filebytes);
  </code></pre>
  
  <p>Is there any alternative way to do the same. </p>