public class BoundaryBase64InputStream extends Base64InputStream
The data is read and decoded until the underlying stream is entirely read or the boundary line is reached indicating the end of the MIME part.
| Constructor and Description |
|---|
BoundaryBase64InputStream(java.io.InputStream is,
java.lang.String boundary)
Creates a new BoundaryBase64InputStream to read data from the specified
input stream.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Returns the number of bytes that can be read from this input
stream without blocking.
|
protected void |
notify(byte[] buffer)
Called by super class if a '-' shall be decoded.
|
int |
read()
Reads the next byte of data from this input stream.
|
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from this input stream into an array of bytes.
|
setIgnoreInvalidCharacterspublic BoundaryBase64InputStream(java.io.InputStream is,
java.lang.String boundary)
throws java.io.IOException
is - the underlying input streamboundary - the boundary of the MIME partjava.io.IOException - if an I/O error occurs during reading from the streamprotected void notify(byte[] buffer)
throws java.io.IOException
notify in class Base64InputStreambuffer - the characters already read from the input stream; and the
first one was marked with NOTIFYjava.io.IOException - allows the subclass to throw an Exception if an error occurspublic int read()
throws java.io.IOException
read in class Base64InputStreamjava.io.IOException - if an I/O error occurspublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class Base64InputStreamb - the buffer into which the data is readoff - the start offset of the datalen - the maximum number of bytes readjava.io.IOException - if an I/O error occurspublic int available()
throws java.io.IOException
available in class java.io.FilterInputStreamjava.io.IOException - if an I/O error occurs