| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private int | |
| private int | |
| private int | |
| private int | |
| private static byte[] | |
| private boolean | |
| private byte[] | |
| private static final char[] | pem_array
This array maps the characters to their 6 bit values |
| Access | Constructor and Description |
|---|---|
| public | BASE64EncoderStream(OutputStream
the output stream out, int 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. bytesPerLine)Create a BASE64 encoder that encodes the specified output stream. |
| public | BASE64EncoderStream(OutputStream
the output stream out)Create a BASE64 encoder that encodes the specified input stream. |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | close()
Overrides java. Implements java. |
| private void | |
| public static byte[] | |
| private static byte[] | |
| private static int | encodedSize(int size)
Return the corresponding encoded size for the given number of bytes, not including any CRLF. |
| public synchronized void | flush()
Overrides java. Implements java. |
| public synchronized void | write(byte[]
the data. b, int the start offset in the data. off, int the number of bytes to write. len)Overrides java. len bytes from the specified
byte array starting at offset off to
this output stream.
|
| public void | write(byte[]
the data to be written. b)Overrides java. b.length bytes to this output stream.
|
| public synchronized void | write(int
the c)byte.Overrides java. byte to this output stream.
|
| buffer | back to summary |
|---|---|
| private byte[] buffer | |
| bufsize | back to summary |
|---|---|
| private int bufsize | |
| bytesPerLine | back to summary |
|---|---|
| private int bytesPerLine | |
| count | back to summary |
|---|---|
| private int count | |
| lineLimit | back to summary |
|---|---|
| private int lineLimit | |
| newline | back to summary |
|---|---|
| private static byte[] newline | |
| noCRLF | back to summary |
|---|---|
| private boolean noCRLF | |
| outbuf | back to summary |
|---|---|
| private byte[] outbuf | |
| pem_array | back to summary |
|---|---|
| private static final char[] pem_array This array maps the characters to their 6 bit values | |
| BASE64EncoderStream | back to summary |
|---|---|
| public BASE64EncoderStream(OutputStream out, int bytesPerLine) Create a BASE64 encoder that encodes the specified output stream.
| |
| BASE64EncoderStream | back to summary |
|---|---|
| public BASE64EncoderStream(OutputStream out) Create a BASE64 encoder that encodes the specified input stream. Inserts the CRLF sequence after outputting 76 bytes.
| |
| close | back to summary |
|---|---|
| public synchronized void close() throws IOException Overrides java. Implements java. Forces any buffered output bytes to be encoded out to the stream and closes this output stream
| |
| encode | back to summary |
|---|---|
| private void encode() throws IOException Encode the data stored in
| |
| encode | back to summary |
|---|---|
| public static byte[] encode(byte[] inbuf) 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.
| |
| encode | back to summary |
|---|---|
| private static byte[] encode(byte[] inbuf, int off, int size, byte[] outbuf) Internal use only version of encode. Allow specifying which part of the input buffer to encode. If outbuf is non-null, it's used as is. Otherwise, a new output buffer is allocated. | |
| encodedSize | back to summary |
|---|---|
| private static int encodedSize(int size) Return the corresponding encoded size for the given number of bytes, not including any CRLF. | |
| flush | back to summary |
|---|---|
| public synchronized void flush() throws IOException Overrides java. Implements java. Flushes this output stream and forces any buffered output bytes to be encoded out to the stream.
| |
| write | back to summary |
|---|---|
| public synchronized void write(byte[] b, int off, int len) throws IOException Overrides java. Encodes
| |
| write | back to summary |
|---|---|
| public void write(byte[] b) throws IOException Overrides java. Encodes
| |
| write | back to summary |
|---|---|
| public synchronized void write(int c) throws IOException Overrides java. Encodes the specified
| |