com.sun.mail.smtp
类 SMTPOutputStream

java.lang.Object
  继承者 java.io.OutputStream
      继承者 java.io.FilterOutputStream
          继承者 com.sun.mail.util.CRLFOutputStream
              继承者 com.sun.mail.smtp.SMTPOutputStream
所有已实现的接口:
Closeable, Flushable

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.

作者:
Max Spivak
另请参见:
CRLFOutputStream

字段摘要
 
从类 com.sun.mail.util.CRLFOutputStream 继承的字段
atBOL, lastb
 
从类 java.io.FilterOutputStream 继承的字段
out
 
构造方法摘要
SMTPOutputStream(OutputStream os)
           
 
方法摘要
 void ensureAtBOL()
          Ensure we're at the beginning of a line.
 void flush()
          Override flush method in FilterOutputStream.
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
从类 com.sun.mail.util.CRLFOutputStream 继承的方法
write, writeln
 
从类 java.io.FilterOutputStream 继承的方法
close
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

SMTPOutputStream

public SMTPOutputStream(OutputStream os)
方法详细信息

write

public void write(int b)
           throws IOException
覆盖:
CRLFOutputStream 中的 write
抛出:
IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
覆盖:
CRLFOutputStream 中的 write
抛出:
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.

指定者:
接口 Flushable 中的 flush
覆盖:
FilterOutputStream 中的 flush

ensureAtBOL

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

抛出:
IOException


Copyright © 2013. All Rights Reserved.