net.spy.util
Class Base64OutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by net.spy.util.Base64OutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class Base64OutputStream
extends java.io.FilterOutputStream

A FilterOutputStream that encodes data into Base64.


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
Base64OutputStream(java.io.OutputStream os)
          Get a new Base64OutputStream encoding the given OutputStream.
 
Method Summary
 void close()
          Close this stream and finish up the Base64.
 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(java.io.OutputStream os)
Get a new Base64OutputStream encoding the given OutputStream.

Method Detail

write

public void write(byte[] data,
                  int offset,
                  int length)
           throws java.io.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.

Overrides:
write in class java.io.FilterOutputStream
Throws:
java.io.IOException
See Also:
FilterOutputStream

close

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

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.FilterOutputStream
Throws:
java.io.IOException

write

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

Throws:
java.io.IOException


Copyright © 1995-2005 SPY Internetworking. All Rights Reserved.