public class ASN1Boolean extends ASN1Primitive
Use following to place a new instance of ASN.1 Boolean in your data:
ASN1Boolean.getInstance(boolean)ASN1Boolean.getInstance(int)| Modifier and Type | Field and Description |
|---|---|
static ASN1Boolean |
FALSE |
static ASN1Boolean |
TRUE |
| Modifier and Type | Method and Description |
|---|---|
static ASN1Boolean |
fromContents(byte contents) |
static ASN1Boolean |
fromContents(byte[] contents) |
static ASN1Boolean |
getInstance(ASN1TaggedObject taggedObject,
boolean declaredExplicit)
Return a Boolean from a tagged object.
|
static ASN1Boolean |
getInstance(boolean value)
Return an ASN1Boolean from the passed in boolean.
|
static ASN1Boolean |
getInstance(int value)
Return an ASN1Boolean from the passed in value.
|
static ASN1Boolean |
getInstance(java.lang.Object obj)
Return a boolean from the passed in object.
|
static ASN1Boolean |
getTagged(ASN1TaggedObject taggedObject,
boolean declaredExplicit) |
int |
hashCode() |
boolean |
isFalse() |
boolean |
isTrue() |
java.lang.String |
toString() |
encodeTo, encodeTo, equals, equals, equals, fromByteArray, fromStream, toASN1PrimitivegetEncoded, getEncoded, hasEncodedTagValuepublic static final ASN1Boolean FALSE
public static final ASN1Boolean TRUE
public static ASN1Boolean fromContents(byte contents)
public static ASN1Boolean fromContents(byte[] contents)
public static ASN1Boolean getInstance(java.lang.Object obj)
obj - an ASN1Boolean or an object that can be converted into one.java.lang.IllegalArgumentException - if the object cannot be converted.public static ASN1Boolean getInstance(boolean value)
value - true or false depending on the ASN1Boolean wanted.public static ASN1Boolean getInstance(int value)
value - non-zero (true) or zero (false) depending on the ASN1Boolean wanted.public static ASN1Boolean getInstance(ASN1TaggedObject taggedObject, boolean declaredExplicit)
taggedObject - the tagged object holding the object we wantdeclaredExplicit - true if the object is meant to be explicitly
tagged false otherwise.java.lang.IllegalArgumentException - if the tagged object cannot
be converted.public static ASN1Boolean getTagged(ASN1TaggedObject taggedObject, boolean declaredExplicit)
public boolean isFalse()
public boolean isTrue()
public int hashCode()
hashCode in class ASN1Primitivepublic java.lang.String toString()
toString in class java.lang.Object