This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


com.sun.mail.smtp
class SMTPOutputStream

com.sun.mail.util.CRLFOutputStream extended by com.sun.mail.smtp.SMTPOutputStream

public class SMTPOutputStream
extends CRLFOutputStream

In addition to converting lines into the canonical format, i.e., terminating lines with the CRLF sequence, escapes the "." by adding another "." to any "." that appears in the beginning of a line. See RFC821 section 4.5.2.


Field Summary
 
Fields inherited from class com.sun.mail.util.CRLFOutputStream
atBOL, lastb
 
Constructor Summary

          
 
Method Summary
 void

          Ensure we're at the beginning of a line.
 void

          Override flush method in FilterOutputStream.
 void
write(byte[] b, int off, int len)

          
 void
write(int b)

          
 
Methods inherited from class com.sun.mail.util.CRLFOutputStream
write, write, write, writeln
 

Constructor Detail

SMTPOutputStream

public SMTPOutputStream(OutputStream os)
Parameters:
os
Method Detail

ensureAtBOL

public void ensureAtBOL()
                 throws IOException
Ensure we're at the beginning of a line. Write CRLF if not.

Throws:
IOException

flush

public void flush()
Override flush method in FilterOutputStream. The MimeMessage writeTo method flushes its buffer at the end, but we don't want to flush data out to the socket until we've also written the terminating "\r\n.\r\n". We buffer nothing so there's nothing to flush. We depend on the fact that CRLFOutputStream also buffers nothing. SMTPTransport will manually flush the socket before reading the response.

Overrides:
flush in class FilterOutputStream

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class CRLFOutputStream
Parameters:
b
off
len
Throws:
IOException

write

public void write(int b)
           throws IOException
Overrides:
write in class CRLFOutputStream
Parameters:
b
Throws:
IOException


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention. The official Sun™ documentation can be found here at http://java.sun.com/products/javamail/javadocs/index.html.