public DERApplicationSpecific(int tagNo, ASN1EncodableVector vec) { this.tag = tagNo; this.isConstructed = true; ByteArrayOutputStream bOut = new ByteArrayOutputStream(); for (int i = 0; i != vec.size(); i++) { try { bOut.write(((ASN1Encodable) vec.get(i)).getEncoded()); } catch (IOException e) { throw new ASN1ParsingException("malformed object: " + e, e); } } this.octets = bOut.toByteArray(); }
/** create a sequence containing a vector of objects. */ public DERSequence(ASN1EncodableVector v) { for (int i = 0; i != v.size(); i++) { this.addObject(v.get(i)); } }