public class Base64InputStream extends InputStream implements InputStreaming
| Modifier and Type | Field and Description | 
|---|---|
protected static byte[] | 
EMPTY
Empty binary data. 
 | 
protected int[] | 
m_abGroup
Group of bytes (stored as ints 0..255). 
 | 
protected boolean | 
m_fClosed
True after close is invoked. 
 | 
protected boolean | 
m_fEOF
True after eof is determined. 
 | 
protected int | 
m_ofbGroup
The offset in the group of bytes. 
 | 
protected Reader | 
m_reader
The Reader object from which the Base64 encoded data is read. 
 | 
| Constructor and Description | 
|---|
Base64InputStream(Reader reader)
Construct a Base64InputStream on a Reader object. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
available()
Returns the number of bytes that can be read (or skipped over) from
 this input stream without blocking by the next caller of a method for
 this input stream. 
 | 
void | 
close()
Close the stream, flushing any accumulated bytes. 
 | 
static int | 
decode(char ch)
Decode one base64 alphabet character. 
 | 
static byte[] | 
decode(char[] ach)
Decode the passed character data that was encoded using Base64 encoding. 
 | 
static byte[] | 
decode(char[] ach,
      boolean fJunk)
Decode the passed character data that was encoded using Base64 encoding. 
 | 
static byte[] | 
decode(char[] ach,
      int of,
      int cch)
Decode the passed character data that was encoded using Base64 encoding. 
 | 
static byte[] | 
decode(char[] ach,
      int of,
      int cch,
      boolean fJunk)
Decode the passed character data that was encoded using Base64 encoding. 
 | 
int | 
read()
Reads the next byte of data from the input stream. 
 | 
mark, markSupported, read, read, reset, skipprotected static final byte[] EMPTY
protected boolean m_fClosed
protected boolean m_fEOF
protected Reader m_reader
protected int[] m_abGroup
protected int m_ofbGroup
public Base64InputStream(Reader reader)
reader - the Reader to read the Base64 encoded data frompublic int read()
         throws IOException
int in the range 0 to
 255. If no byte is available because the end of the stream
 has been reached, the value -1 is returned. This method
 blocks until input data is available, the end of the stream is detected,
 or an exception is thrown.read in interface com.oracle.common.io.InputStreamingread in class InputStream-1 if the end of the
             stream is reached.IOException - if an I/O error occurs.public int available()
              throws IOException
available in interface com.oracle.common.io.InputStreamingavailable in class InputStreamIOException - if an I/O error occurs.public void close()
           throws IOException
close in interface com.oracle.common.io.InputStreamingclose in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOException - if an I/O error occurs.public static byte[] decode(char[] ach)
ach - the array containing the characters to decodepublic static byte[] decode(char[] ach,
                            boolean fJunk)
ach - the array containing the characters to decodefJunk - true if the char array may contain whitespace or
               linefeedspublic static byte[] decode(char[] ach,
                            int of,
                            int cch)
ach - the array containing the characters to decodeof - the start offset in the char arraycch - the number of characters to decodepublic static byte[] decode(char[] ach,
                            int of,
                            int cch,
                            boolean fJunk)
ach - the array containing the characters to decodeof - the start offset in the char arraycch - the number of characters to decodefJunk - true if the char array may contain whitespace or
               linefeedspublic static int decode(char ch)
ch - the character