Top Description Constructors Methods
org.bouncycastle.asn1

public Class BERSequenceGenerator

extends BERGenerator
Class Inheritance
Imports
java.io.IOException, .OutputStream

A stream generator for DER SEQUENCEs

Constructor Summary

AccessConstructor and Description
public
BERSequenceGenerator(OutputStream
target stream
out
)

Use the passed in stream as the target for the generator, writing out the header tag for a constructed SEQUENCE.

public
BERSequenceGenerator(OutputStream
target stream
out
,
int
the tag number to introduce
tagNo
,
boolean
true if this is an explicitly tagged object, false otherwise.
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 TypeMethod and Description
public void
addObject(ASN1Encodable
an ASN.1 encodable object to add.
object
)

Add an object to the SEQUENCE being generated.

public void
close()

Close of the generator, writing out the BER end tag.

Inherited from org.bouncycastle.asn1.BERGenerator:
getRawOutputStreamwriteBEREndwriteBERHeader

Constructor Detail

BERSequenceGeneratorback to summary
public BERSequenceGenerator(OutputStream out) throws IOException

Use the passed in stream as the target for the generator, writing out the header tag for a constructed SEQUENCE.

Parameters
out:OutputStream

target stream

Exceptions
IOException:
if the target stream cannot be written to.
BERSequenceGeneratorback to summary
public BERSequenceGenerator(OutputStream out, int tagNo, boolean isExplicit) throws IOException

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:OutputStream

target stream

tagNo:int

the tag number to introduce

isExplicit:boolean

true if this is an explicitly tagged object, false otherwise.

Exceptions
IOException:
if the target stream cannot be written to.

Method Detail

addObjectback to summary
public void addObject(ASN1Encodable object) throws IOException

Add an object to the SEQUENCE being generated.

Parameters
object:ASN1Encodable

an ASN.1 encodable object to add.

Exceptions
IOException:
if the target stream cannot be written to or the object cannot be encoded.
closeback to summary
public void close() throws IOException

Close of the generator, writing out the BER end tag.

Exceptions
IOException:
if the target stream cannot be written.