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

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -