| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private int | |
| private boolean | |
| private int | |
| private byte[] | |
| private int | |
| private int | |
| private static final char[] | pem_array
This character array provides the character to value map based on RFC1521. |
| private static final byte[] |
| Access | Constructor and Description |
|---|---|
| public | BASE64DecoderStream(InputStream
the input stream in)Create a BASE64 decoder that decodes the specified input stream. |
| public | BASE64DecoderStream(InputStream
the input stream in, boolean ignore errors in encoded data? ignoreErrors)Create a BASE64 decoder that decodes the specified input stream. |
| Modifier and Type | Method and Description |
|---|---|
| public int | available()
Overrides java. |
| private int | Returns: the number of bytes filled, always a multiple of three, and may be zerothe buffer into which to put the decoded bytes outbuf, int position in the buffer to start filling pos, int the number of bytes to fill len)The decoder algorithm. |
| public static byte[] | |
| private int | Returns: the next byte, -1 on EOF, or -2 if next byte is '=' (padding at end of encoded data)Read the next valid byte from the input stream. |
| public boolean | markSupported()
Overrides java. |
| public int | Returns: next byte of data, or-1 if the end of the
stream is reached.Overrides java. |
| public int | Returns: the total number of bytes read into the buffer, or-1 if there is no more data because the end of
the stream has been reached.the buffer into which the data is read. buf, int the start offset of the data. off, int the maximum number of bytes read. len)Overrides java. len decoded bytes of data from this input stream
into an array of bytes.
|
| private String | |
| public long | skip(long
the number of bytes to be skipped. n)Overrides java. |
| buffer | back to summary |
|---|---|
| private byte[] buffer | |
| bufsize | back to summary |
|---|---|
| private int bufsize | |
| ignoreErrors | back to summary |
|---|---|
| private boolean ignoreErrors | |
| index | back to summary |
|---|---|
| private int index | |
| input_buffer | back to summary |
|---|---|
| private byte[] input_buffer | |
| input_len | back to summary |
|---|---|
| private int input_len | |
| input_pos | back to summary |
|---|---|
| private int input_pos | |
| pem_array | back to summary |
|---|---|
| private static final char[] pem_array This character array provides the character to value map based on RFC1521. | |
| pem_convert_array | back to summary |
|---|---|
| private static final byte[] pem_convert_array | |
| BASE64DecoderStream | back to summary |
|---|---|
| public BASE64DecoderStream(InputStream in) Create a BASE64 decoder that decodes the specified input stream.
The System property
| |
| BASE64DecoderStream | back to summary |
|---|---|
| public BASE64DecoderStream(InputStream in, boolean ignoreErrors) Create a BASE64 decoder that decodes the specified input stream.
| |
| available | back to summary |
|---|---|
| public int available() throws IOException Overrides java. Returns the number of bytes that can be read from this input stream without blocking. However, this figure is only a close approximation in case the original encoded stream contains embedded CRLFs; since the CRLFs are discarded, not decoded
| |
| decode | back to summary |
|---|---|
| private int decode(byte[] outbuf, int pos, int len) throws IOException The decoder algorithm. Most of the complexity here is dealing with error cases. Returns the number of bytes decoded, which may be zero. Decoding is done by filling an int with 4 6-bit values by shifting them in from the bottom and then extracting 3 8-bit bytes from the int by shifting them out from the bottom.
| |
| decode | back to summary |
|---|---|
| public static byte[] decode(byte[] inbuf) Base64 decode a byte array. No line breaks are allowed. This method is suitable for short strings, such as those in the IMAP AUTHENTICATE protocol, but not to decode the entire content of a MIME part. Note inbuf may only contain valid base64 characters. Whitespace is not ignored.
| |
| getByte | back to summary |
|---|---|
| private int getByte() throws IOException Read the next valid byte from the input stream. Buffer lots of data from underlying stream in input_buffer, for efficiency.
| |
| markSupported | back to summary |
|---|---|
| public boolean markSupported() Overrides java. Tests if this input stream supports marks. Currently this class does not support marks
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Overrides java. Read the next decoded byte from this input stream. The byte
is returned as an
| |
| read | back to summary |
|---|---|
| public int read(byte[] buf, int off, int len) throws IOException Overrides java. Reads up to
| |
| recentChars | back to summary |
|---|---|
| private String recentChars() Return the most recent characters, for use in an error message. | |
| skip | back to summary |
|---|---|
| public long skip(long n) throws IOException Overrides java. Skips over and discards n bytes of data from this stream.
| |