net.spy.util
Class Base64OutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byjava.io.FilterOutputStream
          extended bynet.spy.util.Base64OutputStream

public class Base64OutputStream
extends FilterOutputStream

A FilterOutputStream that encodes data into Base64.


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
Base64OutputStream(OutputStream os)
          Get a new Base64OutputStream encoding the given OutputStream.
 
Method Summary
 void close()
          Close this stream and finish up the Base64.
static void main(String[] args)
           
 void write(byte datum)
          Write the given byte to the underlying OutputStream.
 void write(byte[] data, int offset, int length)
          Writes len bytes from the specified byte array starting at offset off to this output stream.
 
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 os)
Get a new Base64OutputStream encoding the given OutputStream.

Method Detail

write

public void write(byte[] data,
                  int offset,
                  int length)
           throws IOException
Writes len bytes from the specified byte array starting at offset off to this output stream. See the documentation for FilterOutputStream for more details.

Throws:
IOException
See Also:
FilterOutputStream

close

public void close()
           throws IOException
Close this stream and finish up the Base64.

Throws:
IOException

write

public void write(byte datum)
           throws IOException
Write the given byte to the underlying OutputStream.

Throws:
IOException

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception