public abstract class ASN1Object extends Object implements ASN1Encodable, Encodable
Constructor and Description |
---|
ASN1Object() |
Modifier and Type | Method and Description |
---|---|
void |
encodeTo(OutputStream output) |
void |
encodeTo(OutputStream output,
String encoding) |
boolean |
equals(Object o) |
byte[] |
getEncoded()
Return the default BER or DER encoding for this object.
|
byte[] |
getEncoded(String encoding)
Return either the default for "BER" or a DER encoding if "DER" is specified.
|
protected static boolean |
hasEncodedTagValue(Object obj,
int tagValue)
Return true if obj is a byte array and represents an object with the given tag value.
|
int |
hashCode() |
abstract ASN1Primitive |
toASN1Primitive()
Method providing a primitive representation of this object suitable for encoding.
|
public void encodeTo(OutputStream output) throws IOException
IOException
public void encodeTo(OutputStream output, String encoding) throws IOException
IOException
public byte[] getEncoded() throws IOException
getEncoded
in interface Encodable
IOException
- on encoding error.public byte[] getEncoded(String encoding) throws IOException
encoding
- name of encoding to use.IOException
- on encoding error.protected static boolean hasEncodedTagValue(Object obj, int tagValue)
obj
- object of interest.tagValue
- tag value to check for.public abstract ASN1Primitive toASN1Primitive()
toASN1Primitive
in interface ASN1Encodable
Copyright © 2021 BouncyCastle.org. All rights reserved.