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