indices.put(key.intValue(), cosValue == null ? null : convertCOSToPD(cosValue));
COSObjectable pdValue = convertCOSToPD( cosValue ); indices.put( key.intValue(), pdValue );
/** * This will return a map of numbers. The key will be a java.lang.Integer, the value will * depend on where this class is being used. * * @return A map of COS objects. * * @throws IOException If there is a problem creating the values. */ public Map<Integer,COSObjectable> getNumbers() throws IOException { Map<Integer, COSObjectable> indices = null; COSArray namesArray = (COSArray)node.getDictionaryObject( COSName.NUMS ); if( namesArray != null ) { indices = new HashMap<>(); for( int i=0; i<namesArray.size(); i+=2 ) { COSInteger key = (COSInteger)namesArray.getObject(i); COSBase cosValue = namesArray.getObject( i+1 ); COSObjectable pdValue = convertCOSToPD( cosValue ); indices.put( key.intValue(), pdValue ); } indices = Collections.unmodifiableMap(indices); } return indices; }