org.apache.myfaces.trinidad.util
Class Base64InputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.apache.myfaces.trinidad.util.Base64InputStream
All Implemented Interfaces:
Closeable

public class Base64InputStream
extends InputStream

An InputStream that decodes data from base64 representation into a binary format. It takes a Reader as its single argument to its constructor and base64 characters read in from the Reader are correspondingly made available to be read out in the corresponding binary format via the read() method.


Constructor Summary
Base64InputStream(Reader in)
           
 
Method Summary
 int available()
           
 void close()
           
 int read()
          Read a single character.
 
Methods inherited from class java.io.InputStream
mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64InputStream

public Base64InputStream(Reader in)
Method Detail

read

public int read()
         throws IOException
Read a single character. Overrides InputStream.read()

Specified by:
read in class InputStream
Returns:
The byte read, as an integer, or -1 if the end of the stream has been reached
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException

available

public int available()
              throws IOException
Overrides:
available in class InputStream
Throws:
IOException


Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.