fi.hut.tml.xsmiles.mlfc.general
Class Base64EncoderStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byfi.hut.tml.xsmiles.mlfc.general.Base64EncoderStream

public class Base64EncoderStream
extends java.io.OutputStream

This class implements a Base64 Character encoder as specified in RFC1113. Unlike some other encoding schemes there is nothing in this encoding that indicates where a buffer starts or ends. This means that the encoded text will simply start with the first line of encoded text and end with the last line of encoded text.

Version:
$Id: Base64EncoderStream.java 2168 2002-02-05 16:31:25Z honkkis $
Author:
Thomas DeWeese, Vincent Hardy, Chuck McManis

Constructor Summary
Base64EncoderStream(java.io.OutputStream out)
           
Base64EncoderStream(java.io.OutputStream out, boolean closeOutOnClose)
           
 
Method Summary
 void close()
           
 void flush()
          This can't really flush out output since that may generate '=' chars which would indicate the end of the stream.
 void write(byte[] data)
           
 void write(byte[] data, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64EncoderStream

public Base64EncoderStream(java.io.OutputStream out)

Base64EncoderStream

public Base64EncoderStream(java.io.OutputStream out,
                           boolean closeOutOnClose)
Method Detail

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
This can't really flush out output since that may generate '=' chars which would indicate the end of the stream. Instead we flush out. You can only be sure all output is writen by closing this stream.

Throws:
java.io.IOException

write

public void write(int b)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] data)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] data,
                  int off,
                  int len)
           throws java.io.IOException
Throws:
java.io.IOException


X-Smiles 1.2