}
else
{
if( ap instanceof COSStream )
{
COSStream aux = (COSStream) ap;
ap = new COSDictionary();
((COSDictionary)ap).setItem(COSName.getPDFName( "default" ), aux );
}
COSDictionary map = (COSDictionary)ap;
Map actuals = new HashMap();
retval = new COSDictionaryMap( actuals, map );
Iterator asNames = map.keyList().iterator();
while( asNames.hasNext() )
{
COSName asName = (COSName)asNames.next();
COSStream as = (COSStream)map.getDictionaryObject( asName );
actuals.put( asName.getName(), new PDAppearanceStream( as ) );
}
}
return retval;