public static long copy ( final File input , final OutputStream output ) throws IOException { long size = 0L ; InputStream file_input = null ; try { file_input = new FileInputStream ( input ) ; //throws FileNotFoundException size = copy ( file_input , output ) ; //throws IOException } finally { try { file_input . close ( ) ; } catch ( Exception ex ) { //ignorable } } return size ; }
Reads the contents from the file and writes them to the specified stream .