code: 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;
      }
docs: Reads the contents from the file and writes them to the specified stream.
  
  @param   input
  the input file.
  @param   output
  the output stream.
  @return
  the total number of bytes written to the output.