* @throws IOException
*/
private void writeMessages(MessageCatalog msgCat, List<Message> messages,
OutputStream outputStream) throws IOException {
// write messages
WritableMessageCatalog output = msgCat.writeTo(outputStream);
try {
for (Message msg : messages) {
output.writeMessage(msg);
}
} finally {
output.close();
}
}