private void advanceToNextRecords() throws IOException {
LOGGER.finer("Advancing to the next group of records.");
try {
HttpClientRequest cr = new HttpClientRequest();
cr.setUrl(info.newUrl(startIndex, itemsPerPage));
XmlHandler sh = new XmlHandler(true);
cr.setContentHandler(sh);
cr.setCredentialProvider(info.newCredentialProvider());
try{
cr.execute();
}catch (HttpClientException hcex){
if(hcex.getHttpStatusCode() == 404){
cr.setUrl(info.newUrl(-1, -1));
sh = new XmlHandler(true);
cr.setContentHandler(sh);
cr.setCredentialProvider(info.newCredentialProvider());
cr.execute();
noMore = true;
}
}
Document doc = sh.getDocument();
XPath xPath = XPathFactory.newInstance().newXPath();
xPath.setNamespaceContext(makeNamespaceContext());
NodeList entries = (NodeList) xPath.evaluate("/atom:feed/atom:entry", doc, XPathConstants.NODESET);
String entryProcessorClassName = info.getEntryProcessorClassName();