org.entityfs.support.io
Class Base64InputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.entityfs.support.io.InputStreamProxy
          extended by 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

Constructor Summary
Base64InputStream(InputStream is)
           
 
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)
           
 
Methods inherited from class org.entityfs.support.io.InputStreamProxy
close, getProxied, mark, markSupported, reset, skip, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Base64InputStream

public Base64InputStream(InputStream is)
Method Detail

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