com.sun.mail.util
类 QPEncoderStream

java.lang.Object
  继承者 java.io.OutputStream
      继承者 java.io.FilterOutputStream
          继承者 com.sun.mail.util.QPEncoderStream
所有已实现的接口:
Closeable, Flushable
直接已知子类:
QEncoderStream

public class QPEncoderStream
extends FilterOutputStream

This class implements a Quoted Printable Encoder. It is implemented as a FilterOutputStream, so one can just wrap this class around any output stream and write bytes into this filter. The Encoding is done as the bytes are written out.

作者:
John Mani

字段摘要
 
从类 java.io.FilterOutputStream 继承的字段
out
 
构造方法摘要
QPEncoderStream(OutputStream out)
          Create a QP encoder that encodes the specified input stream.
QPEncoderStream(OutputStream out, int bytesPerLine)
          Create a QP encoder that encodes the specified input stream
 
方法摘要
 void close()
          Forces any buffered output bytes to be encoded out to the stream and closes this output stream
 void flush()
          Flushes this output stream and forces any buffered output bytes to be encoded out to the stream.
protected  void output(int c, boolean encode)
           
 void write(byte[] b)
          Encodes b.length bytes to this output stream.
 void write(byte[] b, int off, int len)
          Encodes len bytes from the specified byte array starting at offset off to this output stream.
 void write(int c)
          Encodes the specified byte to this output stream.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

QPEncoderStream

public QPEncoderStream(OutputStream out,
                       int bytesPerLine)
Create a QP encoder that encodes the specified input stream

参数:
out - the output stream
bytesPerLine - the number of bytes per line. The encoder inserts a CRLF sequence after this many number of bytes.

QPEncoderStream

public QPEncoderStream(OutputStream out)
Create a QP encoder that encodes the specified input stream. Inserts the CRLF sequence after outputting 76 bytes.

参数:
out - the output stream
方法详细信息

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Encodes len bytes from the specified byte array starting at offset off to this output stream.

覆盖:
FilterOutputStream 中的 write
参数:
b - the data.
off - the start offset in the data.
len - the number of bytes to write.
抛出:
IOException - if an I/O error occurs.

write

public void write(byte[] b)
           throws IOException
Encodes b.length bytes to this output stream.

覆盖:
FilterOutputStream 中的 write
参数:
b - the data to be written.
抛出:
IOException - if an I/O error occurs.

write

public void write(int c)
           throws IOException
Encodes the specified byte to this output stream.

覆盖:
FilterOutputStream 中的 write
参数:
c - the byte.
抛出:
IOException - if an I/O error occurs.

flush

public void flush()
           throws IOException
Flushes this output stream and forces any buffered output bytes to be encoded out to the stream.

指定者:
接口 Flushable 中的 flush
覆盖:
FilterOutputStream 中的 flush
抛出:
IOException - if an I/O error occurs.

close

public void close()
           throws IOException
Forces any buffered output bytes to be encoded out to the stream and closes this output stream

指定者:
接口 Closeable 中的 close
覆盖:
FilterOutputStream 中的 close
抛出:
IOException

output

protected void output(int c,
                      boolean encode)
               throws IOException
抛出:
IOException


Copyright © 2013. All Rights Reserved.