private void saveTrustedHost(String fingerprint) throws IOException {
  this.fingerprint=fingerprint;
  logger.warn("Adding %s as known and trusted certificate for %s.",fingerprint,serverId);
  createKnownCertFileIfNotExists();
  assertKnownHostFileWritable();
  BufferedWriter writer=new BufferedWriter(new FileWriter(knownHosts,true));
  writer.write(serverId + " " + this.fingerprint);
  writer.newLine();
  writer.close();
}

private void saveTrustedHost ( String fingerprint ) throws IOException { this . fingerprint = fingerprint ; logger . warn ( "Adding %s as known and trusted certificate for %s." , fingerprint , serverId ) ; createKnownCertFileIfNotExists ( ) ; assertKnownHostFileWritable ( ) ; BufferedWriter writer = new BufferedWriter ( new FileWriter ( knownHosts , true ) ) ; writer . write ( serverId + " " + this . fingerprint ) ; writer . newLine ( ) ; writer . close ( ) ; }
save a new ( server_ip , cert ) pair into knownhosts file
