}
}
private void processSubStream(COSStream cosStream) throws IOException {
List<COSBase> arguments = new ArrayList<COSBase>();
PDFStreamParser parser = new PDFStreamParser(cosStream, forceParsing);
try {
Iterator<Object> iter = parser.getTokenIterator();
while (iter.hasNext()) {
Object next = iter.next();
if (log.isDebugEnabled()) {
log.debug("processing substream token: " + next);
}
if (next instanceof COSObject) {
arguments.add(((COSObject) next).getObject());
} else if (next instanceof PDFOperator) {
processOperator((PDFOperator) next, arguments);
arguments = new ArrayList<COSBase>();
} else {
arguments.add((COSBase) next);
}
}
} finally {
parser.close();
}
}