Base64 decoding in Java and i think encoding also can done with some classes in this package
package is
import org.apache.commons.codec.binary.Base64;
and the logic is
String filepath = "C:\\Users\\sandeep\\somefile";
String encodedString = null;
try {
File file=new File(filepath);
FileReader fr = new FileReader(file);
BufferedReader reader = new BufferedReader(fr);
while ((encodedString = reader.readLine()) != null) {
byte[] binOfEncoded = Base64.decodeBase64(encodedString.getBytes());
System.out.println("Base64 Decoded String : " + binOfEncoded);
}
} catch (IOException x) {
System.err.format("IOException: %s%n", x);
}