|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
com.novell.io.Base64InputStream
An extension of java.io.InputStream that decodes base64-encoded
data from an InputStream.
Base64OutputStream| Constructor Summary | |
Base64InputStream(InputStream in)
Constructs a new Base64InputStream that will read and decode from the
passed InputStream. |
|
Base64InputStream(String str)
Constructs a new Base64InputStream that will read and decode the passed String. |
|
| Method Summary | |
static byte[] |
decode(char[] data)
Return an array of bytes which were encoded in the passed
char array. |
static byte[] |
decode(char[] data,
int off,
int len)
Return an array of bytes which were encoded in the passed
char array. |
static byte[] |
decode(String strData)
Return an array of bytes which were encoded in the passed
String. |
protected void |
fill_buffer()
Fills buf with a new chunk of decoded data. |
int |
peek()
Returns the next byte which will be read. |
int |
read()
Reads a byte of data (stripping whitespace). |
int |
read(byte[] b,
int off,
int len)
Reads into an array of bytes. |
long |
skip(long n)
Skips bytes of input. |
| Methods inherited from class java.io.InputStream |
available, close, mark, markSupported, read, reset |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Base64InputStream(InputStream in)
Base64InputStream that will read and decode from the
passed InputStream.
in - the input streampublic Base64InputStream(String str)
Base64InputStream that will read and decode the passed String.
str - The String to decode.| Method Detail |
public int read()
throws IOException
IOException - If an I/O error has occurred.
public int peek()
throws IOException
IOException - If an I/O error has occurred.
public int read(byte[] b,
int off,
int len)
throws IOException
b - the buffer into which the data is readoff - the start offset of the datalen - the maximum number of bytes read
IOException - If an I/O error has occurred.
public long skip(long n)
throws IOException
n - bytes to be skipped
IOException - If an I/O error has occurred.
protected void fill_buffer()
throws IOException
IOException - If an I/O error has occurred.
public static byte[] decode(String strData)
throws IOException
bytes which were encoded in the passed
String.
strData - the string of base64-encoded characters
byte array
IOException - thrown if encoded data is malformed
public static byte[] decode(char[] data)
throws IOException
bytes which were encoded in the passed
char array.
data - the array of base64-encoded characters
byte array
IOException - thrown if encoded data is malformed
public static byte[] decode(char[] data,
int off,
int len)
throws IOException
bytes which were encoded in the passed
char array.
data - the array of base64-encoded charactersoff - the starting offset in datalen - the number of chars to decode from data
byte array
IOException - thrown if encoded data is malformed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||