+// Copyright 2000-2005 the Contributors, as shown in the revision logs.
+// Licensed under the Apache Public Source License 2.0 ("the License").
+// You may not use this file except in compliance with the License.
+
package org.ibex.mail.target;
import org.ibex.mail.*;
import org.ibex.util.*;
import java.text.*;
/** a fast-write, slow-read place to stash all messages we touch -- in case of a major f*ckup */
-public class Transcript extends Target {
+public class Transcript implements Target {
public static final Transcript transcript = new Transcript(Mailbox.STORAGE_ROOT + File.separatorChar + "transcript");
File target = new File(today.getPath() + File.separatorChar + time + ".txt");
OutputStream os = new FileOutputStream(target);
- message.dump(new Stream(os));
- os.flush();
- os.close();
+ try {
+ message.getStream().transcribe(new Stream(os));
+ os.flush();
+ } finally { os.close(); }
} catch (IOException e) { throw new MailException.IOException(e); }
}
}