public static SignedDataParser getInstance( Object o) throws IOException { if (o instanceof ASN1Sequence) { return new SignedDataParser(((ASN1Sequence)o).parser()); } if (o instanceof ASN1SequenceParser) { return new SignedDataParser((ASN1SequenceParser)o); } throw new IOException("unknown object encountered: " + o.getClass().getName()); }
public static SignedDataParser getInstance( Object o) throws IOException { if (o instanceof ASN1Sequence) { return new SignedDataParser(((ASN1Sequence)o).parser()); } if (o instanceof ASN1SequenceParser) { return new SignedDataParser((ASN1SequenceParser)o); } throw new IOException("unknown object encountered: " + o.getClass().getName()); }
public static TimeStampedDataParser getInstance(Object obj) throws IOException { if (obj instanceof ASN1Sequence) { return new TimeStampedDataParser(((ASN1Sequence)obj).parser()); } if (obj instanceof ASN1SequenceParser) { return new TimeStampedDataParser((ASN1SequenceParser)obj); } return null; }
public static TimeStampedDataParser getInstance(Object obj) throws IOException { if (obj instanceof ASN1Sequence) { return new TimeStampedDataParser(((ASN1Sequence)obj).parser()); } if (obj instanceof ASN1SequenceParser) { return new TimeStampedDataParser((ASN1SequenceParser)obj); } return null; }
public ASN1Encodable readObject() throws IOException { if (index == max) { return null; } ASN1Encodable obj = getObjectAt(index++); if (obj instanceof ASN1Sequence) { return ((ASN1Sequence)obj).parser(); } if (obj instanceof ASN1Set) { return ((ASN1Set)obj).parser(); } return obj; }
public ASN1Encodable readObject() throws IOException { if (index == max) { return null; } ASN1Encodable obj = getObjectAt(index++); if (obj instanceof ASN1Sequence) { return ((ASN1Sequence)obj).parser(); } if (obj instanceof ASN1Set) { return ((ASN1Set)obj).parser(); } return obj; }
public ASN1Encodable readObject() throws IOException { if (index == max) { return null; } ASN1Encodable obj = getObjectAt(index++); if (obj instanceof ASN1Sequence) { return ((ASN1Sequence)obj).parser(); } if (obj instanceof ASN1Set) { return ((ASN1Set)obj).parser(); } return obj; }
public ASN1Encodable readObject() throws IOException { if (index == max) { return null; } ASN1Encodable obj = getObjectAt(index++); if (obj instanceof ASN1Sequence) { return ((ASN1Sequence)obj).parser(); } if (obj instanceof ASN1Set) { return ((ASN1Set)obj).parser(); } return obj; }
/** * Return the object held in this tagged object as a parser assuming it has * the type of the passed in tag. If the object doesn't have a parser * associated with it, the base object is returned. */ public ASN1Encodable getObjectParser( int tag, boolean isExplicit) { switch (tag) { case BERTags.SET: return ASN1Set.getInstance(this, isExplicit).parser(); case BERTags.SEQUENCE: return ASN1Sequence.getInstance(this, isExplicit).parser(); case BERTags.OCTET_STRING: return ASN1OctetString.getInstance(this, isExplicit).parser(); } if (isExplicit) { return getObject(); } throw new RuntimeException("implicit tagging not implemented for tag: " + tag); }
/** * Return the object held in this tagged object as a parser assuming it has * the type of the passed in tag. If the object doesn't have a parser * associated with it, the base object is returned. */ public ASN1Encodable getObjectParser( int tag, boolean isExplicit) throws IOException { switch (tag) { case BERTags.SET: return ASN1Set.getInstance(this, isExplicit).parser(); case BERTags.SEQUENCE: return ASN1Sequence.getInstance(this, isExplicit).parser(); case BERTags.OCTET_STRING: return ASN1OctetString.getInstance(this, isExplicit).parser(); } if (isExplicit) { return getObject(); } throw new ASN1Exception("implicit tagging not implemented for tag: " + tag); }
ASN1SequenceParser parser = ((ASN1Sequence) sequence).parser(); ASN1TaggedObject entry = parseAsn1TaggedObject(parser); for (; entry != null; entry = parseAsn1TaggedObject(parser)) {