Package org.bouncycastle.asn1
Class DERApplicationSpecific
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.ASN1Primitive
org.bouncycastle.asn1.DERApplicationSpecific
- All Implemented Interfaces:
ASN1Encodable
- Direct Known Subclasses:
BERApplicationSpecific
public class DERApplicationSpecific extends ASN1Primitive
Base class for an application specific object
-
Constructor Summary
Constructors Constructor Description DERApplicationSpecific(boolean explicit, int tag, ASN1Encodable object)DERApplicationSpecific(int tag, byte[] octets)DERApplicationSpecific(int tag, ASN1Encodable object)DERApplicationSpecific(int tagNo, ASN1EncodableVector vec) -
Method Summary
Modifier and Type Method Description intgetApplicationTag()byte[]getContents()static DERApplicationSpecificgetInstance(Object obj)ASN1PrimitivegetObject()Return the enclosed object assuming explicit tagging.ASN1PrimitivegetObject(int derTagNo)Return the enclosed object assuming implicit tagging.inthashCode()Returns an integer hash code for this object.booleanisConstructed()Methods inherited from class org.bouncycastle.asn1.ASN1Primitive
equals, fromByteArray, toASN1PrimitiveMethods inherited from class org.bouncycastle.asn1.ASN1Object
getEncoded, getEncoded, hasEncodedTagValue, toASN1Object
-
Constructor Details
-
DERApplicationSpecific
public DERApplicationSpecific(int tag, byte[] octets) -
DERApplicationSpecific
- Throws:
IOException
-
DERApplicationSpecific
- Throws:
IOException
-
DERApplicationSpecific
-
-
Method Details
-
getInstance
-
isConstructed
public boolean isConstructed() -
getContents
public byte[] getContents() -
getApplicationTag
public int getApplicationTag() -
getObject
Return the enclosed object assuming explicit tagging.- Returns:
- the resulting object
- Throws:
IOException- if reconstruction fails.
-
getObject
Return the enclosed object assuming implicit tagging.- Parameters:
derTagNo- the type tag that should be applied to the object's contents.- Returns:
- the resulting object
- Throws:
IOException- if reconstruction fails.
-
hashCode
public int hashCode()Description copied from class:ObjectReturns an integer hash code for this object. By contract, any two objects for whichObject.equals(java.lang.Object)returnstruemust return the same hash code value. This means that subclasses ofObjectusually override both methods or neither method.Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCodemethod if you intend implementing your ownhashCodemethod.- Specified by:
hashCodein classASN1Primitive- Returns:
- this object's hash code.
- See Also:
Object.equals(java.lang.Object)
-