code: public static void encodeFileToFile(String infile, String outfile) throws IOException {
  		String encoded = Base64.encodeFromFile(infile);
  		java.io.OutputStream out = null;
  		try {
  			out = new java.io.BufferedOutputStream(new FileOutputStream(outfile));
  			out.write(encoded.getBytes("US-ASCII")); // Strict, 7-bit output.
  		} catch (IOException e) {
  			throw e; // Catch and release to execute finally{}
  		} finally {
  			try {
  				if (out != null) {
  					out.close();
  				}
  			} catch (Exception ex) {
  			}
  		}
  	}
docs: Reads <tt>infile</tt> and encodes it to <tt>outfile</tt>.
  
  @param infile Input file
  @param outfile Output file
  @throws java.io.IOException if there is an error
  @since 2.2