org.shlublu.javax.data
Class Base64OutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--java.io.FilterOutputStream
              |
              +--org.shlublu.javax.data.Base64OutputStream

public class Base64OutputStream
extends java.io.FilterOutputStream

RFC 2045 compliant Base 64 stream encoder.
This stream filters a given OutputStream

Since:
0.7
See Also:
Base64

Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
Base64OutputStream(java.io.OutputStream ostream)
          Create this filter using the given OutputStream
 
Method Summary
 void close()
          Closes this output stream and releases any system resources associated with the stream.
 void flush()
          Flushes this output stream and forces any buffered output bytes to be written out to the stream.
 void write(byte[] abyData, int iStartIndex, int iLength)
          Encode iLength bytes from the specified byte array starting at offset iStartIndex to this output stream.
 void write(int iByte)
          Encode the specified byte to this output stream
 
Methods inherited from class java.io.FilterOutputStream
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 ostream)
Create this filter using the given OutputStream
Parameters:
ostream - The stream to filter
Method Detail

write

public void write(int iByte)
           throws java.io.IOException
Encode the specified byte to this output stream
Overrides:
write in class java.io.FilterOutputStream

write

public void write(byte[] abyData,
                  int iStartIndex,
                  int iLength)
Encode iLength bytes from the specified byte array starting at offset iStartIndex to this output stream.
Overrides:
write in class java.io.FilterOutputStream

flush

public void flush()
           throws java.io.IOException
Flushes this output stream and forces any buffered output bytes to be written out to the stream. The padding characters are added when calling this method.
Overrides:
flush in class java.io.FilterOutputStream

close

public void close()
           throws java.io.IOException
Closes this output stream and releases any system resources associated with the stream.
Overrides:
close in class java.io.FilterOutputStream