Package org.bouncycastle.asn1
Class BERSequenceGenerator
java.lang.Object
org.bouncycastle.asn1.ASN1Generator
org.bouncycastle.asn1.BERGenerator
org.bouncycastle.asn1.BERSequenceGenerator
A stream generator for DER SEQUENCEs
-
Field Summary
Fields inherited from class org.bouncycastle.asn1.ASN1Generator
_out -
Constructor Summary
ConstructorsConstructorDescriptionUse the passed in stream as the target for the generator, writing out the header tag for a constructed SEQUENCE.BERSequenceGenerator(OutputStream out, int tagNo, boolean isExplicit) Use the passed in stream as the target for the generator, writing out the header tag for a tagged constructed SEQUENCE (possibly implicit). -
Method Summary
Modifier and TypeMethodDescriptionvoidaddObject(ASN1Encodable object) Add an object to the SEQUENCE being generated.voidclose()Close of the generator, writing out the BER end tag.Methods inherited from class org.bouncycastle.asn1.BERGenerator
getRawOutputStream, writeBEREnd, writeBERHeader
-
Constructor Details
-
BERSequenceGenerator
Use the passed in stream as the target for the generator, writing out the header tag for a constructed SEQUENCE.- Parameters:
out- target stream- Throws:
IOException- if the target stream cannot be written to.
-
BERSequenceGenerator
Use the passed in stream as the target for the generator, writing out the header tag for a tagged constructed SEQUENCE (possibly implicit).- Parameters:
out- target streamtagNo- the tag number to introduceisExplicit- true if this is an explicitly tagged object, false otherwise.- Throws:
IOException- if the target stream cannot be written to.
-
-
Method Details
-
addObject
Add an object to the SEQUENCE being generated.- Parameters:
object- an ASN.1 encodable object to add.- Throws:
IOException- if the target stream cannot be written to or the object cannot be encoded.
-
close
Close of the generator, writing out the BER end tag.- Throws:
IOException- if the target stream cannot be written.
-