private ResourceCollectionDiff getDiff() throws IOException {
// start by initiating the HTTP connection to the server
URLConnection conn = makeGetRequest(LIST_ACTION);
conn.connect();
// now, while the server is thinking, do our calculations locally.
ResourceCollectionInfo localList = new ResourceListing(localCollection,
ResourceFilterFactory.DEFAULT_FILTER);
// finally, retrieve the list from the server and compare the two.
ResourceCollectionInfo remoteList = XmlCollectionListing
.parseListing(new BufferedInputStream(conn.getInputStream()));
return new ResourceCollectionDiff(localList, remoteList);
}