public void encode(OutputStream out) throws IOException {
  DerOutputStream tmp=new DerOutputStream();
  tmp.write(key.getEncoded());
  out.write(tmp.toByteArray());
}

public void encode ( OutputStream out ) throws IOException { DerOutputStream tmp = new DerOutputStream ( ) ; tmp . write ( key . getEncoded ( ) ) ; out . write ( tmp . toByteArray ( ) ) ; }
encode the key in der form to the stream .
