Enumeration e = seq.getObjects();
while (e.hasMoreElements())
{
if (!(e.nextElement() instanceof DERUTF8String))
{
throw new IllegalArgumentException("attempt to insert non UTF8 STRING into PKIFreeText");
}
}
strings = seq;
if (obj instanceof PKIFreeText)
{
return (PKIFreeText)obj;
}
else if (obj instanceof ASN1Sequence)
{
return new PKIFreeText((ASN1Sequence)obj);
}
throw new IllegalArgumentException("Unknown object in factory");