writer = new BufferedWriter(new FileWriter(dataDump.getPath()));
writer.write(dataDump.getDataSet());
}
catch (Exception e)
{
throw new DatabaseDumpException("Unable to dump database state to " + dataDump.getPath(), e);
}
finally
{
dumpDataCommand.setResult(true);
if (writer != null)
{
try
{
writer.close();
}
catch (IOException e)
{
throw new DatabaseDumpException("Unable to close writer.", e);
}
}
}
}