MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / encodeFileToFile

Method encodeFileToFile

java/src/cx/fbn/encrypt/Base64.java:1569–1586  ·  view source on GitHub ↗

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 )

Source from the content-addressed store, hash-verified

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 /**

Callers

nothing calls this directly

Calls 3

encodeFromFileMethod · 0.95
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected