|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.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 byte s which were encoded in the passed
char array. |
static byte[] |
decode(char[] data,
int off,
int len)
Return an array of byte s which were encoded in the passed
char array. |
static byte[] |
decode(String strData)
Return an array of byte s 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
byte
s which were encoded in the passed
String
.
strData
- the string of base64-encoded characters
byte
array
IOException
- thrown if encoded data is malformedpublic static byte[] decode(char[] data) throws IOException
byte
s which were encoded in the passed
char
array.
data
- the array of base64-encoded characters
byte
array
IOException
- thrown if encoded data is malformedpublic static byte[] decode(char[] data, int off, int len) throws IOException
byte
s which were encoded in the passed
char
array.
data
- the array of base64-encoded charactersoff
- the starting offset in data
len
- the number of char
s 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 |