Reads infile and encodes it to outfile . @param infile Input file @param outfile Output file @throws java.io.IOException if there is an error @since 2.2
( String infile, String outfile )
| 1567 | * @since 2.2 |
| 1568 | */ |
| 1569 | public static void encodeFileToFile( String infile, String outfile ) |
| 1570 | throws java.io.IOException { |
| 1571 | |
| 1572 | String encoded = Base64.encodeFromFile( infile ); |
| 1573 | java.io.OutputStream out = null; |
| 1574 | try{ |
| 1575 | out = new java.io.BufferedOutputStream( |
| 1576 | new java.io.FileOutputStream( outfile ) ); |
| 1577 | out.write( encoded.getBytes("US-ASCII") ); // Strict, 7-bit output. |
| 1578 | } // end try |
| 1579 | catch( java.io.IOException e ) { |
| 1580 | throw e; // Catch and release to execute finally{} |
| 1581 | } // end catch |
| 1582 | finally { |
| 1583 | try { out.close(); } |
| 1584 | catch( Exception ex ){} |
| 1585 | } // end finally |
| 1586 | } // end encodeFileToFile |
| 1587 | |
| 1588 | |
| 1589 | /** |
nothing calls this directly
no test coverage detected