ccs.mime
Class Base64InputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
ccs.mime.Base64InputStream
- All Implemented Interfaces:
- java.io.Closeable
public class Base64InputStream
- extends java.io.FilterInputStream
Decodes a stream containing a MIME base64 encoded binary.
Fields inherited from class java.io.FilterInputStream |
in |
Constructor Summary |
Base64InputStream(java.io.InputStream in)
Construct a Base64 decoder with the default buffer size. |
Base64InputStream(java.io.InputStream in,
int bufsz)
Construct a Base64 decoder with the specified buffer size. |
Method Summary |
int |
read()
Read a single byte from the stream. |
int |
read(byte[] wad,
int off,
int len)
Reads part of an array from the stream. |
Methods inherited from class java.io.FilterInputStream |
available, close, mark, markSupported, read, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Base64InputStream
public Base64InputStream(java.io.InputStream in)
- Construct a Base64 decoder with the default buffer size. Other comments
as the constructor of two parameters.
Base64InputStream
public Base64InputStream(java.io.InputStream in,
int bufsz)
- Construct a Base64 decoder with the specified buffer size.
The stream will always attempt to read the full buffer from its source.
(This guarantee is useful when working with e.g. a ccs.utils.LineInputStream.)
read
public int read()
throws java.io.IOException
- Read a single byte from the stream. Not usually recommended.
- Overrides:
read
in class java.io.FilterInputStream
- Throws:
java.io.IOException
read
public int read(byte[] wad,
int off,
int len)
throws java.io.IOException
- Reads part of an array from the stream.
- Overrides:
read
in class java.io.FilterInputStream
- Returns:
- The number of bytes actually read, or -1 for EOF.
- Throws:
java.io.IOException