public static void encodeFileToFile(String infile, String outfile)
			throws java.io.IOException {

		String encoded = Base64.encodeFromFile(infile);
		java.io.OutputStream out = null;
		try {
			out = new java.io.BufferedOutputStream(
					new java.io.FileOutputStream(outfile));
			out.write(encoded.getBytes("US-ASCII")); // Strict, 7-bit output.
		} // end try
		catch (java.io.IOException e) {
			throw e; // Catch and release to execute finally{}
		} // end catch
		finally {
			try {
				out.close();
			} catch (Exception ex) {
			}
		} // end finally
	} // end encodeFileToFile