log.debug("Writing message " + message.getId() + " '" + message.getSubject() + "' to disk");
FileOutputStream fout = new FileOutputStream(new File(queueDirectory, String.valueOf(message.getId()) + ".msg"));
try {
DataOutputStream dout = new DataOutputStream(fout);
dout.writeLong(message.getId());
dout.writeUTF(message.getSinkName());
dout.writeBoolean(message.isUrgent());
dout.writeUTF(message.getSubject());
for (Iterator i = message.getRecipients().iterator(); i.hasNext();) {
Recipient r = (Recipient) i.next();
dout.writeInt(r.getRecipientType());