code: public static long copy(final InputStream input,
                             final OutputStream output,
                             final int size)
           throws IOException {
        return copy(input, output, new byte[size]);
     }
docs: Copy all of the bytes from the input stream to the output stream.
  
  @param input  Stream to read bytes from.
  @param output Stream to write bytes to.
  @param size   The size of the buffer to use while copying.
  @return The total number of bytes copied.
  @throws IOException Failed to copy bytes.