Top Description Fields Constructors Methods
org.bouncycastle.asn1

public abstract Class DERGenerator

extends ASN1Generator
Class Inheritance
Known Direct Subclasses
org.bouncycastle.asn1.DERSequenceGenerator
Imports
java.io.ByteArrayOutputStream, .IOException, .OutputStream

Basic class for streaming DER encoding generators.

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private int
Inherited from org.bouncycastle.asn1.ASN1Generator:
_out

Constructor Summary

AccessConstructor and Description
protected
public
DERGenerator(OutputStream
the output stream to encode objects to.
out
,
int
the tag number to head the output stream with.
tagNo
,
boolean
true if the tagging should be explicit, false otherwise.
isExplicit
)

Create a DER encoding generator for a tagged object.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
writeDEREncoded(OutputStream out, int tag, byte[] bytes)

pack-priv void
writeDEREncoded(int tag, byte[] bytes)

private void
writeLength(OutputStream out, int length)

Inherited from org.bouncycastle.asn1.ASN1Generator:
getRawOutputStream

Field Detail

_isExplicitback to summary
private boolean _isExplicit
_taggedback to summary
private boolean _tagged
_tagNoback to summary
private int _tagNo

Constructor Detail

DERGeneratorback to summary
protected DERGenerator(OutputStream out)
DERGeneratorback to summary
public DERGenerator(OutputStream out, int tagNo, boolean isExplicit)

Create a DER encoding generator for a tagged object.

Parameters
out:OutputStream

the output stream to encode objects to.

tagNo:int

the tag number to head the output stream with.

isExplicit:boolean

true if the tagging should be explicit, false otherwise.

Method Detail

writeDEREncodedback to summary
pack-priv void writeDEREncoded(OutputStream out, int tag, byte[] bytes) throws IOException
writeDEREncodedback to summary
pack-priv void writeDEREncoded(int tag, byte[] bytes) throws IOException
writeLengthback to summary
private void writeLength(OutputStream out, int length) throws IOException