org.apache.geronimo.javamail.util
Class MIMEOutputStream
java.lang.Object
java.io.OutputStream
org.apache.geronimo.javamail.util.MIMEOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class MIMEOutputStream
- extends OutputStream
An implementation of an OutputStream that performs MIME linebreak
canonicalization and "byte-stuff" so that data content does not get mistaken
for a message data-end marker (CRLF.CRLF)l
- Version:
- $Rev: 670717 $ $Date: 2008-06-23 15:41:19 -0400 (Mon, 23 Jun 2008) $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
out
protected OutputStream out
lastWrite
protected int lastWrite
atLineBreak
protected boolean atLineBreak
MIMEOutputStream
public MIMEOutputStream(OutputStream out)
- Create an output stream that writes to the target output stream.
- Parameters:
out
- The wrapped output stream.
write
public void write(int ch)
throws IOException
- Specified by:
write
in class OutputStream
- Throws:
IOException
forceTerminatingLineBreak
public void forceTerminatingLineBreak()
throws IOException
- Force the stream to be terminated at a line break.
This is generally in preparation for the transport to
write out an end-of-data marker, which generally
needs to be preceded by a CRLF sequence.
- Throws:
IOException
writeSMTPTerminator
public void writeSMTPTerminator()
throws IOException
- Write out the SMTP terminator to the output stream.
This ensures that we don't write out an extra
CRLF if the data terminates with that value.
- Throws:
IOException
Copyright © 2003-2009 The Apache Software Foundation. All Rights Reserved.