| java.lang.Object | |||
| ↳ | java.io.OutputStream | ||
| ↳ | java.io.FilterOutputStream | ||
| ↳ | com.google.code.com.sun.mail.util.BASE64EncoderStream | ||
Known Direct Subclasses
|
This class implements a BASE64 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.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| buffer | |||||||||||
| bufsize | |||||||||||
| bytesPerLine | |||||||||||
| count | |||||||||||
| lineLimit | |||||||||||
| newline | |||||||||||
| noCRLF | |||||||||||
| outbuf | |||||||||||
| pem_array | This array maps the characters to their 6 bit values | ||||||||||
|
[Expand]
Inherited Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.FilterOutputStream
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Create a BASE64 encoder that encodes the specified output stream.
| |||||||||||
Create a BASE64 encoder that encodes the specified input stream.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Forces any buffered output bytes to be encoded out to the stream
and closes this output stream
| |||||||||||
Base64 encode a byte array.
| |||||||||||
Flushes this output stream and forces any buffered output bytes
to be encoded out to the stream.
| |||||||||||
Encodes
len bytes from the specified
byte array starting at offset off to
this output stream. | |||||||||||
Encodes
b.length bytes to this output stream. | |||||||||||
Encodes the specified
byte to this output stream. | |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.io.FilterOutputStream
| |||||||||||
From class
java.io.OutputStream
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.io.Closeable
| |||||||||||
From interface
java.io.Flushable
| |||||||||||
This array maps the characters to their 6 bit values
Create a BASE64 encoder that encodes the specified output stream.
| out | The output stream |
|---|---|
| bytesPerLine | Number of bytes per line. The encoder inserts a CRLF sequence after the specified number of bytes, unless bytesPerLine is Integer.MAX_VALUE, in which case no CRLF is inserted. bytesPerLine is rounded down to a multiple of 4. |
Create a BASE64 encoder that encodes the specified input stream. Inserts the CRLF sequence after outputting 76 bytes.
| out | The output stream |
|---|
Forces any buffered output bytes to be encoded out to the stream and closes this output stream
| IOException |
|---|
Base64 encode a byte array. No line breaks are inserted. This method is suitable for short strings, such as those in the IMAP AUTHENTICATE protocol, but not to encode the entire content of a MIME part.
| inbuf |
|---|
Flushes this output stream and forces any buffered output bytes to be encoded out to the stream.
| IOException | if an I/O error occurs. |
|---|
Encodes len bytes from the specified
byte array starting at offset off to
this output stream.
| b | The data. |
|---|---|
| off | The start offset in the data. |
| len | The number of bytes to write. |
| IOException | if an I/O error occurs. |
|---|
Encodes b.length bytes to this output stream.
| b | The data to be written. |
|---|
| IOException | if an I/O error occurs. |
|---|
Encodes the specified byte to this output stream.
| c | The byte. |
|---|
| IOException | if an I/O error occurs. |
|---|