|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
java.io.InputStream
com.tangosol.io.Base64InputStream
public class Base64InputStream
Reads binary data from a Reader using IETF RFC 2045 Base64 Content Transfer Encoding. Static helpers are available for decoding directly from a char array to a byte array.
Field Summary | |
---|---|
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 java.io.Reader |
m_reader The Reader object from which the Base64 encoded data is read. |
Constructor Summary | |
---|---|
Base64InputStream(java.io.Reader reader) Construct a Base64InputStream on a Reader object. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.io.InputStream |
---|
mark, markSupported, read, read, reset, skip |
Methods inherited from interface com.oracle.common.io.InputStreaming |
---|
mark, markSupported, read, read, reset, skip |
Field Detail |
---|
protected static final byte[] EMPTY
protected boolean m_fClosed
protected boolean m_fEOF
protected java.io.Reader m_reader
protected int[] m_abGroup
protected int m_ofbGroup
Constructor Detail |
---|
public Base64InputStream(java.io.Reader reader)
reader
- the Reader to read the Base64 encoded data fromMethod Detail |
---|
public int read() throws java.io.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.InputStreaming
read
in class java.io.InputStream
-1
if the end of the stream is reached.java.io.IOException
- if an I/O error occurs.public int available() throws java.io.IOException
available
in interface com.oracle.common.io.InputStreaming
available
in class java.io.InputStream
java.io.IOException
- if an I/O error occurs.public void close() throws java.io.IOException
close
in interface com.oracle.common.io.InputStreaming
close
in interface java.io.Closeable
close
in class java.io.InputStream
java.io.IOException
- 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
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |