}
public void backupKeyDatabase( KeyManager manager, File backupDirectory )
throws IOException, XMLStreamException
{
AuthenticationKeyDatabase database = new AuthenticationKeyDatabase();
database.setKeys( manager.getAllKeys() );
RedbackKeyManagementJdoStaxWriter writer = new RedbackKeyManagementJdoStaxWriter();
FileWriter fileWriter = new FileWriter( new File( backupDirectory, KEYS_XML_NAME ) );
try
{