/** * Resolves all not already parsed objects of a dictionary recursively. * * @param dictionaryObject dictionary to be parsed * @throws IOException if something went wrong * */ private void parseDictionaryRecursive(COSObject dictionaryObject) throws IOException { parseObjectDynamically(dictionaryObject, true); COSDictionary dictionary = (COSDictionary)dictionaryObject.getObject(); for(COSBase value : dictionary.getValues()) { if (value instanceof COSObject) { COSObject object = (COSObject)value; if (object.getObject() == null) { parseDictionaryRecursive(object); } } } }
parseDictionaryRecursive(trailerEncryptObj);