private String identitiesDump(Identity[] identities) {
final StringBuffer buf = new StringBuffer();
for (int i = 0; i < identities.length; i++) {
buf.append("IdentityProvides_Type #")
.append(i);
Identity id = identities[i];
if (id == null) {
buf.append(" is null.\n");
} else {
buf.append(":\n")
.append(" - interface: '")
.append(id.getIface())
.append("'\n");
buf.append(" - ip: '")
.append(id.getIp())
.append("'\n");
buf.append(" - hostname: '")
.append(id.getHostname())
.append("'\n");
buf.append(" - ssh pubkey: '")
.append(id.getPubkey())
.append("'\n");
}
}
return buf.toString();
}