| java.lang.Object |
| ↳ |
java.io.OutputStream |
| |
↳ |
java.io.FilterOutputStream |
| |
|
↳ |
com.google.code.com.sun.mail.util.QPEncoderStream |
Known Direct Subclasses
| QEncoderStream |
This class implements a Q Encoder as defined by RFC 2047 for
encoding MIME headers. |
|
Class Overview
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.
Summary
|
[Expand]
Inherited Fields |
From class
java.io.FilterOutputStream
|
protected
OutputStream |
out |
|
|
| Public Constructors |
|
|
QPEncoderStream(OutputStream out, int bytesPerLine)
Create a QP encoder that encodes the specified input stream
|
|
|
QPEncoderStream(OutputStream out)
Create a QP encoder that encodes the specified input stream.
|
| Public Methods |
|
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.
|
|
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(byte[] b)
Encodes b.length bytes to this output stream.
|
|
void
|
write(int c)
Encodes the specified byte to this output stream.
|
| Protected Methods |
|
void
|
output(int c, boolean encode)
|
|
[Expand]
Inherited Methods |
From class
java.io.FilterOutputStream
|
void
|
close()
|
|
void
|
flush()
|
|
void
|
write(byte[] arg0, int arg1, int arg2)
|
|
void
|
write(byte[] arg0)
|
|
void
|
write(int arg0)
|
|
From class
java.io.OutputStream
|
void
|
close()
|
|
void
|
flush()
|
|
void
|
write(byte[] arg0, int arg1, int arg2)
|
|
void
|
write(byte[] arg0)
|
|
abstract
void
|
write(int arg0)
|
|
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
From interface
java.io.Closeable
|
From interface
java.io.Flushable
|
Fields
private
static
final
char[]
hex
Public Constructors
public
QPEncoderStream
(OutputStream out, int bytesPerLine)
Create a QP encoder that encodes the specified input stream
Parameters
| out
| The output stream |
| bytesPerLine
| The number of bytes per line. The encoder
inserts a CRLF sequence after this many number
of bytes.
|
public
QPEncoderStream
(OutputStream out)
Create a QP encoder that encodes the specified input stream.
Inserts the CRLF sequence after outputting 76 bytes.
Public Methods
public
void
close
()
Forces any buffered output bytes to be encoded out to the stream
and closes this output stream
public
void
flush
()
Flushes this output stream and forces any buffered output bytes
to be encoded out to the stream.
Throws
| IOException
| if an I/O error occurs.
|
public
void
write
(byte[] b, int off, int len)
Encodes len bytes from the specified
byte array starting at offset off to
this output stream.
Parameters
| b
| The data. |
| off
| The start offset in the data. |
| len
| The number of bytes to write. |
Throws
| IOException
| if an I/O error occurs.
|
public
void
write
(byte[] b)
Encodes b.length bytes to this output stream.
Parameters
| b
| The data to be written. |
Throws
| IOException
| if an I/O error occurs.
|
public
void
write
(int c)
Encodes the specified byte to this output stream.
Throws
| IOException
| if an I/O error occurs.
|
Protected Methods
protected
void
output
(int c, boolean encode)