Bouncy Castle Cryptography Library 1.48

org.bouncycastle.asn1
Class DERBoolean

java.lang.Object
  extended by org.bouncycastle.asn1.ASN1Object
      extended by org.bouncycastle.asn1.ASN1Primitive
          extended by org.bouncycastle.asn1.DERBoolean
All Implemented Interfaces:
ASN1Encodable
Direct Known Subclasses:
ASN1Boolean

public class DERBoolean
extends ASN1Primitive


Field Summary
static ASN1Boolean FALSE
           
static ASN1Boolean TRUE
           
 
Constructor Summary
DERBoolean(boolean value)
          Deprecated. use getInstance(boolean) method.
 
Method Summary
protected  boolean asn1Equals(ASN1Primitive o)
           
static DERBoolean getInstance(ASN1TaggedObject obj, boolean explicit)
          return a Boolean from a tagged object.
static ASN1Boolean getInstance(boolean value)
          return a ASN1Boolean from the passed in boolean.
static ASN1Boolean getInstance(int value)
          return a ASN1Boolean from the passed in boolean.
static ASN1Boolean getInstance(java.lang.Object obj)
          return a boolean from the passed in object.
 int hashCode()
           
 boolean isTrue()
           
 java.lang.String toString()
           
 
Methods inherited from class org.bouncycastle.asn1.ASN1Primitive
equals, fromByteArray, toASN1Primitive
 
Methods inherited from class org.bouncycastle.asn1.ASN1Object
getEncoded, getEncoded, hasEncodedTagValue, toASN1Object
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FALSE

public static final ASN1Boolean FALSE

TRUE

public static final ASN1Boolean TRUE
Constructor Detail

DERBoolean

public DERBoolean(boolean value)
Deprecated. use getInstance(boolean) method.

Parameters:
value -
Method Detail

getInstance

public static ASN1Boolean getInstance(java.lang.Object obj)
return a boolean from the passed in object.

Throws:
java.lang.IllegalArgumentException - if the object cannot be converted.

getInstance

public static ASN1Boolean getInstance(boolean value)
return a ASN1Boolean from the passed in boolean.


getInstance

public static ASN1Boolean getInstance(int value)
return a ASN1Boolean from the passed in boolean.


getInstance

public static DERBoolean getInstance(ASN1TaggedObject obj,
                                     boolean explicit)
return a Boolean from a tagged object.

Parameters:
obj - the tagged object holding the object we want
explicit - true if the object is meant to be explicitly tagged false otherwise.
Throws:
java.lang.IllegalArgumentException - if the tagged object cannot be converted.

isTrue

public boolean isTrue()

asn1Equals

protected boolean asn1Equals(ASN1Primitive o)

hashCode

public int hashCode()
Specified by:
hashCode in class ASN1Primitive

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Bouncy Castle Cryptography Library 1.48