org.freehep.util.io
Class Base64OutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by org.freehep.util.io.Base64OutputStream
All Implemented Interfaces:
Closeable, Flushable, FinishableOutputStream

public class Base64OutputStream
extends FilterOutputStream
implements FinishableOutputStream

The Base64OutputStream encodes binary data according to RFC 2045.

Version:
$Id: Base64OutputStream.java 8584 2006-08-10 23:06:37Z duns $
Author:
Mark Donszelmann

Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
Base64OutputStream(OutputStream out)
          Creates a Base64 output stream for given output
 
Method Summary
 void close()
           
 void finish()
          Finishes the current outputstream (compresses, flushes, caluclates CRC) and writes whatever is left in the buffers, but does not close the stream.
 void write(int a)
           
 
Methods inherited from class java.io.FilterOutputStream
flush, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64OutputStream

public Base64OutputStream(OutputStream out)
Creates a Base64 output stream for given output

Parameters:
out - stream to write to
Method Detail

write

public void write(int a)
           throws IOException
Overrides:
write in class FilterOutputStream
Throws:
IOException

finish

public void finish()
            throws IOException
Description copied from interface: FinishableOutputStream
Finishes the current outputstream (compresses, flushes, caluclates CRC) and writes whatever is left in the buffers, but does not close the stream.

Specified by:
finish in interface FinishableOutputStream
Throws:
IOException - if write fails

close

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


Copyright © 2000-2007 FreeHEP. All Rights Reserved.