tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Tools and Libs > Ostermiller Utilities > Base64 Decode Stream

Base64 Decode Stream 

Ostermiller Java Utilities contain various components such as CSV parsing, Base64 Encoding, MD5 digest, String and Exec Helper classes. This requires the library ostermillerutils-1.08.01.jar to be in classpath. The following example shows decoding an input stream encoded in Base64 format.

File Name  :  
/OSTERMILLER_UTILS/abcd.enc_stream.txt 

File Name  :  
com/bethecoder/tutorials/ostermillerutils/Base64DecodeStreamTest.java 
Author  :  Sudhakar KV
Email  :  [email protected]
   
package com.bethecoder.tutorials.ostermillerutils;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import com.Ostermiller.util.Base64;

public class Base64DecodeStreamTest {

  /**
   @param args
   @throws IOException 
   */
  public static void main(String[] argsthrows IOException {

    InputStream in = new FileInputStream("abcd.enc_stream.txt");
    OutputStream out = new FileOutputStream("abcd.dec_stream.txt");
    Base64.decode(in, out, true);
  }

}
   

It gives the following output,
File Name  :  
/OSTERMILLER_UTILS/abcd.dec_stream.txt 



 
  


  
bl  br