* @throws IOException If there is an error getting the colorspaces.
     */
    public Map getColorants() throws IOException
    {
        Map actuals = new HashMap();
        COSDictionary colorants = (COSDictionary)dictionary.getDictionaryObject( COSName.getPDFName( "Colorants" ) );
        if( colorants == null )
        {
            colorants = new COSDictionary();
            dictionary.setItem( COSName.getPDFName( "Colorants" ), colorants );
        }
        Iterator iter = colorants.keyList().iterator();
        while( iter.hasNext() )
        {
            COSName name = (COSName)iter.next();
            COSBase value = colorants.getDictionaryObject( name );
            actuals.put( name.getName(), PDColorSpaceFactory.createColorSpace( value ) );
        }
        return new COSDictionaryMap( actuals, colorants );
    }