public void appendScript(Appendable target) throws IOException {
Iterator<MessageData> iterator = messages.iterator();
while (iterator.hasNext()) {
MessageData message = iterator.next();
appendMessageToScript(message, target);
// TODO - synchronization aids?
lastMessageNumber = message.getSequenceNumber();
}
}