com.arcao.geocaching.api.util
Class Base64OutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by com.arcao.geocaching.api.util.Base64OutputStream
All Implemented Interfaces:
Closeable, Flushable

public class Base64OutputStream
extends FilterOutputStream

An OutputStream that does Base64 encoding on the data written to it, writing the resulting data to another OutputStream.


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
Base64OutputStream(OutputStream out, int flags)
          Performs Base64 encoding on the data written to the stream, writing the encoded data to another OutputStream.
Base64OutputStream(OutputStream out, int flags, boolean encode)
          Performs Base64 encoding or decoding on the data written to the stream, writing the encoded/decoded data to another OutputStream.
 
Method Summary
 void close()
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.io.FilterOutputStream
flush, 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 out,
                          int flags)
Performs Base64 encoding on the data written to the stream, writing the encoded data to another OutputStream.

Parameters:
out - the OutputStream to write the encoded data to
flags - bit flags for controlling the encoder; see the constants in Base64

Base64OutputStream

public Base64OutputStream(OutputStream out,
                          int flags,
                          boolean encode)
Performs Base64 encoding or decoding on the data written to the stream, writing the encoded/decoded data to another OutputStream.

Parameters:
out - the OutputStream to write the encoded data to
flags - bit flags for controlling the encoder; see the constants in Base64
encode - true to encode, false to decode
Method Detail

write

public void write(int b)
           throws IOException
Overrides:
write in class FilterOutputStream
Throws:
IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class FilterOutputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class FilterOutputStream
Throws:
IOException


Copyright © 2012. All Rights Reserved.