|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
edu.emory.mathcs.util.io.Base64Decoder
Input stream that decodes from base64 on-the-fly, that is, it converts base64-encoded character stream into a decoded byte stream. It also offers static methods for offline decoding, that is, converting base64-encoded strings into byte arrays.
| Constructor Summary | |
Base64Decoder(java.io.Reader in)
Creates a new base64 decoder that reads character from a specified reader. |
|
| Method Summary | |
void |
close()
|
static byte[] |
decode(java.lang.String base64encoded)
Decodes a base64-encoded string into a byte array. |
static void |
decode(java.lang.String base64encoded,
byte[] buf)
Decodes a base64-encoded string and write the result to the specified byte array. |
static void |
decode(java.lang.String base64encoded,
byte[] buf,
int off)
Decodes a base64-encoded string and write the result to the specified byte array at the given offset. |
int |
read()
|
int |
read(byte[] buf,
int off,
int len)
|
| Methods inherited from class java.io.InputStream |
available, mark, markSupported, read, reset, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Base64Decoder(java.io.Reader in)
in - the reader to read from| Method Detail |
public int read(byte[] buf,
int off,
int len)
throws java.io.IOException
java.io.IOException
public int read()
throws java.io.IOException
java.io.IOException
public void close()
throws java.io.IOException
java.io.IOException
public static byte[] decode(java.lang.String base64encoded)
throws java.lang.IllegalArgumentException
base64encoded - the string to decode
java.lang.IllegalArgumentException - if the string is not valid base64
public static void decode(java.lang.String base64encoded,
byte[] buf)
throws java.lang.IllegalArgumentException
base64encoded - the string to decodebuf - the array to write to
java.lang.IllegalArgumentException - if the string is not valid base64
public static void decode(java.lang.String base64encoded,
byte[] buf,
int off)
base64encoded - the string to decodebuf - the array to write tooff - the offset to start writing at
java.lang.IllegalArgumentException - if the string is not valid base64
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||