Package io.anyline.nfc.bouncycastle.asn1
Class DERSequenceGenerator
-
- All Implemented Interfaces:
public class DERSequenceGenerator extends DERGenerator
A stream generator for DER SEQUENCEs
-
-
Constructor Summary
Constructors Constructor Description DERSequenceGenerator(OutputStream out)
Use the passed in stream as the target for the generator. DERSequenceGenerator(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 Type Method Description void
addObject(ASN1Encodable object)
Add an object to the SEQUENCE being generated. void
addObject(ASN1Primitive primitive)
Add an ASN1.1 primitive to the SEQUENCE being generated. OutputStream
getRawOutputStream()
Return the target stream for the SEQUENCE. void
close()
Close of the generator, writing out the SEQUENCE. -
-
Constructor Detail
-
DERSequenceGenerator
DERSequenceGenerator(OutputStream out)
Use the passed in stream as the target for the generator.- Parameters:
out
- target stream
-
DERSequenceGenerator
DERSequenceGenerator(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).- Parameters:
out
- target streamtagNo
- the tag number to introduceisExplicit
- true if this is an explicitly tagged object, false otherwise.
-
-
Method Detail
-
addObject
void addObject(ASN1Encodable object)
Add an object to the SEQUENCE being generated.
- Parameters:
object
- an ASN.1 encodable object to add.
-
addObject
void addObject(ASN1Primitive primitive)
Add an ASN1.1 primitive to the SEQUENCE being generated.
- Parameters:
primitive
- an ASN.1 primitive to add.
-
getRawOutputStream
OutputStream getRawOutputStream()
Return the target stream for the SEQUENCE.
- Returns:
the OutputStream the SEQUENCE is being written to.
-
close
void close()
Close of the generator, writing out the SEQUENCE.
-
-
-
-