public class Base64InputStream
extends java.io.FilterInputStream
From RFC 2045, section 6.8:
The Base64 Content-Transfer-Encoding is designed to represent arbitrary sequences of octets in a form that need not be humanly readable. The encoding and decoding algorithms are simple, but the encoded data are consistently only about 33 percent larger than the unencoded data.
Constructor and Description |
---|
Base64InputStream(java.io.InputStream in)
Constructs an input stream that decodes an underlying Base64-encoded
stream.
|
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.
|
int |
read()
Reads the next byte of data from the input stream.
|
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from the input stream into an array of
bytes.
|
public Base64InputStream(java.io.InputStream in)
in
- the Base64-encoded streampublic int read() throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.FilterInputStream
java.io.IOException