GokuaiBase/src/main/java/com/gokuai/base/utils/Base64.java
public static void decodeToFile(String dataToDecode, String filename) throws IOException {

		Base64.OutputStream bos = null;
		try {
			bos = new Base64.OutputStream(new java.io.FileOutputStream(filename), Base64.DECODE);
			bos.write(dataToDecode.getBytes(PREFERRED_ENCODING));
		} // end try
		catch (IOException e) {
			throw e; // Catch and throw to execute finally{} block
		} // end catch: java.io.IOException
		finally {
			try {
				bos.close();
			} catch (Exception e) {
			}
		} // end finally

	}
/**
	 * Decode to file.
	 *
	 * @param dataToDecode
	 *            the data to decode
	 * @param filename
	 *            the filename
	 *
	 * @throws IOException
	 *             Signals that an I/O exception has occurred.
	 */
Decode to file.
@param dataToDecode
the data to decode
@param filename
the filename

@throws IOException
Signals that an I/O exception has occurred.
Decode to file . @param dataToDecode the data to decode @param filename the filename @throws IOException Signals that an I / O exception has occurred .
public static void decodeToFile(String dataToDecode, String filename) throws IOException {
		Base64.OutputStream bos = null;
		try {
			bos = new Base64.OutputStream(new java.io.FileOutputStream(filename), Base64.DECODE);
			bos.write(dataToDecode.getBytes(PREFERRED_ENCODING));
		} 
		catch (IOException e) {
			throw e; 
		} 
		finally {
			try {
				bos.close();
			} catch (Exception e) {
			}
		} 
	}
public static void decodeToFile ( String dataToDecode , String filename ) throws IOException { Base64 . OutputStream bos = null ; try { bos = new Base64 . OutputStream ( new java . io . FileOutputStream ( filename ) , Base64 . DECODE ) ; bos . write ( dataToDecode . getBytes ( PREFERRED_ENCODING ) ) ; } catch ( IOException e ) { throw e ; } finally { try { bos . close ( ) ; } catch ( Exception e ) { } } }
Decode to file.
Decode to file .
// end try // Catch and throw to execute finally{} block // end catch: java.io.IOException // end finally