exportFile = new File(directory, "export.xml");
final OutputStream outputStream;
try {
outputStream = new FileOutputStreamNIO(exportFile);
} catch (FileNotFoundException exception) {
throw new StoreException(exception);
}
final BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(
outputStream);
try {
xmlWriter = new XmlWriter(bufferedOutputStream);
} catch (XmlWriterException exception) {
try {
outputStream.close();
} catch (IOException exception2) {
logger.error("closing after error", exception2);
}
throw new StoreException(exception);
}
indentation = 0;
}