for (int i = 0; i < defs.length; i++) {
HttpProcessor processor = (HttpProcessor) ProcessorResolver.createProcessor(
defs[i], scraper.getConfiguration(), scraper);
String documentURI = ((HttpDef) processor.getElementDef()).getUrl();
HttpInfo httpInfo = (HttpInfo) context.get("http");
Variable content = processor.run(scraper, context);
try {
// A document URI and a charset should be provided.
Object inputSource = inputSourceConstructor.newInstance(
new Object[]{new ByteArrayInputStream(content.toBinary()), documentURI, httpInfo.charset});