com.jkristian.io
Class Base64EncodeInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.jkristian.io.FilteredByteInputStream
          extended by com.jkristian.io.InputFilterInputStream
              extended by com.jkristian.io.Base64EncodeInputStream
All Implemented Interfaces:
java.io.Closeable

public class Base64EncodeInputStream
extends InputFilterInputStream

A filter that encodes input from binary bytes to base64 encoding. This filter doesn't break the encoded data into lines (as required for MIME); use another filter to do that, if needed.

Base64 encoding is defined by RFC 2045 (MIME) section 6.8.


Field Summary
 
Fields inherited from class com.jkristian.io.FilteredByteInputStream
CHUNK_LENGTH
 
Constructor Summary
Base64EncodeInputStream(java.io.InputStream in)
           
Base64EncodeInputStream(java.io.InputStream in, int chunkLength)
           
 
Method Summary
 
Methods inherited from class com.jkristian.io.InputFilterInputStream
close, filterInput, main, ready
 
Methods inherited from class com.jkristian.io.FilteredByteInputStream
available, flush, getByteFilter, mark, markSupported, read, read, read, reset, setByteFilter, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64EncodeInputStream

public Base64EncodeInputStream(java.io.InputStream in)

Base64EncodeInputStream

public Base64EncodeInputStream(java.io.InputStream in,
                               int chunkLength)