org.entityfs.support.io
Class Base64OutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by org.entityfs.support.io.OutputStreamProxy
          extended by org.entityfs.support.io.Base64OutputStream
All Implemented Interfaces:
Closeable, Flushable

public class Base64OutputStream
extends OutputStreamProxy

This is an OutputStream that base64 encodes data that is written to it.

This class is not thread safe. It cannot be reused once it has been closed.

Base 64 conversion is defined in RFC 3548.

Since:
1.0
Author:
Karl Gustafsson

Constructor Summary
Base64OutputStream(OutputStream os)
           
 
Method Summary
 void close()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class org.entityfs.support.io.OutputStreamProxy
flush, getProxied, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Base64OutputStream

public Base64OutputStream(OutputStream os)
Method Detail

write

public void write(byte[] b)
           throws IOException
Overrides:
write in class OutputStreamProxy
Throws:
IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class OutputStreamProxy
Throws:
IOException

write

public void write(int b)
           throws IOException
Overrides:
write in class OutputStreamProxy
Throws:
IOException

close

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