X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fmail%2Ftarget%2FTranscript.java;h=af70e95ff8cbd06cc15f19124dc99241d9899999;hb=807197a6bf8a378ea8fd0ce2f3d372ba847434d2;hp=5d105bf440580db866c08aa9f5ae40cbfecfb241;hpb=071000f577ab3a75dc06560dfa1983331df2bd98;p=org.ibex.mail.git diff --git a/src/org/ibex/mail/target/Transcript.java b/src/org/ibex/mail/target/Transcript.java index 5d105bf..af70e95 100644 --- a/src/org/ibex/mail/target/Transcript.java +++ b/src/org/ibex/mail/target/Transcript.java @@ -1,3 +1,7 @@ +// 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.*; @@ -8,7 +12,7 @@ import java.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"); @@ -34,9 +38,10 @@ public class Transcript extends Target { 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); } } }