java - Is there a way to compare two doc files that are located online? -


how go comparing 2 doc files download links on html page? working in java. want pull 2 files 2 separate urls compare them (removing spacing, using trim?)

i using watij bit don't think has capability.

edit: if webpage has multiple hyperlinks named "download file", there way list urls without knowing them , coding them manually?

to compare 2 files. open file input stream , use ioutils

url url1 = new url("http://path/file1.txt"); url url2 = new url("http://path/file2.txt"); inputstream is1 = url1.openstream(); inputstream is2 = url2.openstream(); if( ioutils.contentequals( is1, is2 ) ) {   //the same content } 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -