Here you can find the source of toFile(String base64Code, String targetPath)
public static void toFile(String base64Code, String targetPath) throws Exception
//package com.java2s; //License from project: Open Source License import java.io.FileOutputStream; public class Main { public static void toFile(String base64Code, String targetPath) throws Exception { byte[] buffer = base64Code.getBytes(); FileOutputStream out = new FileOutputStream(targetPath); out.write(buffer);//from w w w .j a v a2s .c o m out.close(); } }