code: public void encode(OutputStream out) throws IOException {
          DerOutputStream tmp = new DerOutputStream();
          algId.encode(tmp);
  
          out.write(tmp.toByteArray());
      }
docs: Encode the algorithm identifier in DER form to the stream.
  
  @param out the DerOutputStream to marshal the contents to.
  @exception IOException on errors.