Here you can find the source of base64ToFile(String base64Code, String targetPath)
Parameter | Description |
---|---|
base64Code | a parameter |
targetPath | a parameter |
Parameter | Description |
---|---|
Exception | an exception |
public static void base64ToFile(String base64Code, String targetPath) throws Exception
//package com.java2s; //License from project: Apache License import java.io.FileOutputStream; public class Main { /**//from ww w. j a v a 2s . c o m * base64 code save to file * * @param base64Code * @param targetPath * @throws Exception */ public static void base64ToFile(String base64Code, String targetPath) throws Exception { byte[] buffer = base64Code.getBytes(); FileOutputStream out = new FileOutputStream(targetPath); out.write(buffer); out.close(); } }