Package org.bouncycastle.asn1
Class ASN1Primitive
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.ASN1Primitive
- All Implemented Interfaces:
ASN1Encodable
,Encodable
- Direct Known Subclasses:
ASN1Absent
,ASN1BitString
,ASN1BMPString
,ASN1Boolean
,ASN1Enumerated
,ASN1External
,ASN1GeneralizedTime
,ASN1GeneralString
,ASN1GraphicString
,ASN1IA5String
,ASN1Integer
,ASN1Null
,ASN1NumericString
,ASN1ObjectDescriptor
,ASN1ObjectIdentifier
,ASN1OctetString
,ASN1PrintableString
,ASN1RelativeOID
,ASN1Sequence
,ASN1Set
,ASN1T61String
,ASN1TaggedObject
,ASN1UniversalString
,ASN1UTCTime
,ASN1UTF8String
,ASN1VideotexString
,ASN1VisibleString
Base class for ASN.1 primitive objects. These are the actual objects used to generate byte encodings.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
encodeTo
(OutputStream output) void
encodeTo
(OutputStream output, String encoding) final boolean
final boolean
equals
(ASN1Encodable other) final boolean
equals
(ASN1Primitive other) static ASN1Primitive
fromByteArray
(byte[] data) Create a base ASN.1 object from a byte stream.abstract int
hashCode()
final ASN1Primitive
Method providing a primitive representation of this object suitable for encoding.Methods inherited from class org.bouncycastle.asn1.ASN1Object
getEncoded, getEncoded, hasEncodedTagValue
-
Method Details
-
encodeTo
- Overrides:
encodeTo
in classASN1Object
- Throws:
IOException
-
encodeTo
- Overrides:
encodeTo
in classASN1Object
- Throws:
IOException
-
fromByteArray
Create a base ASN.1 object from a byte stream.- Parameters:
data
- the byte stream to parse.- Returns:
- the base ASN.1 object represented by the byte stream.
- Throws:
IOException
- if there is a problem parsing the data, or parsing the stream did not exhaust the available data.
-
equals
- Overrides:
equals
in classASN1Object
-
equals
-
equals
-
toASN1Primitive
Description copied from class:ASN1Object
Method providing a primitive representation of this object suitable for encoding.- Specified by:
toASN1Primitive
in interfaceASN1Encodable
- Specified by:
toASN1Primitive
in classASN1Object
- Returns:
- a primitive representation of this object.
-
hashCode
public abstract int hashCode()- Overrides:
hashCode
in classASN1Object
-