org.entityfs.support.io
Class Base64InputStream
java.lang.Object
java.io.InputStream
org.entityfs.support.io.InputStreamProxy
org.entityfs.support.io.Base64InputStream
- All Implemented Interfaces:
- Closeable
public class Base64InputStream
- extends InputStreamProxy
This is an InputStream
that base64-decodes data that it reads.
This class is not thread-safe. Once it has been closed, it cannot be reused.
Base 64 conversion is defined in RFC 3548.
- Since:
- 1.0
- Author:
- Karl Gustafsson
- In_jar:
- entityfs-core
Method Summary |
int |
available()
This method returns the number of bytes available in the underlying
stream divided by two. |
int |
read()
Read the next byte. |
int |
read(byte[] barr)
|
int |
read(byte[] barr,
int off,
int len)
|
Base64InputStream
public Base64InputStream(InputStream is)
available
public int available()
throws IOException
- This method returns the number of bytes available in the underlying
stream divided by two. This is often less than the total number of bytes
that can be read from the stream.
- Overrides:
available
in class InputStreamProxy
- Returns:
- The number of bytes available in the underlying stream divided by
two.
- Throws:
IOException
read
public int read()
throws IOException
- Read the next byte.
- Overrides:
read
in class InputStreamProxy
- Throws:
IOException
read
public int read(byte[] barr)
throws IOException
- Overrides:
read
in class InputStreamProxy
- Throws:
IOException
read
public int read(byte[] barr,
int off,
int len)
throws IOException
- Overrides:
read
in class InputStreamProxy
- Throws:
IOException