public AbstractCas next() throws AnalysisEngineProcessException {
JCas newcas = getEmptyJCas();
newcas.setDocumentText(getNextDocument());
newcas.setDocumentLanguage(language);
DuccDocumentInfo di = new DuccDocumentInfo(newcas);
di.setInputfile(inputFileName);
di.setOutputfile(outputFileName);
di.setDocseq(docInWI++);
di.setByteoffset(wi.getBlockindex() * wi.getBlocksize() + nextDocOffset);
di.addToIndexes();
return newcas;
}