public class ASN1Boolean extends ASN1Primitive
Use following to place a new instance of ASN.1 Boolean in your dataset:
ASN1Boolean.getInstance(boolean)ASN1Boolean.getInstance(int)| Modifier and Type | Field and Description |
|---|---|
static ASN1Boolean |
FALSE |
static ASN1Boolean |
TRUE |
| Modifier | Constructor and Description |
|---|---|
protected |
ASN1Boolean(boolean value)
Deprecated.
use getInstance(boolean) method.
|
protected |
ASN1Boolean(byte[] value) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
asn1Equals(ASN1Primitive o) |
static ASN1Boolean |
getInstance(ASN1TaggedObject obj,
boolean explicit)
return a Boolean from a tagged object.
|
static ASN1Boolean |
getInstance(boolean value)
return an ASN1Boolean from the passed in boolean.
|
static ASN1Boolean |
getInstance(byte[] octets)
return a ASN1Boolean from the passed in array.
|
static ASN1Boolean |
getInstance(int value)
return an ASN1Boolean from the passed in value.
|
static ASN1Boolean |
getInstance(Object obj)
return a boolean from the passed in object.
|
int |
hashCode()
Returns an integer hash code for this object.
|
boolean |
isTrue() |
String |
toString()
Returns a string containing a concise, human-readable description of this
object.
|
equals, fromByteArray, toASN1PrimitivegetEncoded, getEncoded, hasEncodedTagValue, toASN1Objectpublic static final ASN1Boolean FALSE
public static final ASN1Boolean TRUE
protected ASN1Boolean(byte[] value)
protected ASN1Boolean(boolean value)
value - true or false.public static ASN1Boolean getInstance(Object obj)
obj - an ASN1Boolean or an object that can be converted into one.IllegalArgumentException - if the object cannot be converted.public static ASN1Boolean getInstance(boolean value)
public static ASN1Boolean getInstance(int value)
public static ASN1Boolean getInstance(byte[] octets)
public static ASN1Boolean getInstance(ASN1TaggedObject obj, boolean explicit)
obj - the tagged object holding the object we wantexplicit - true if the object is meant to be explicitly
tagged false otherwise.IllegalArgumentException - if the tagged object cannot
be converted.public boolean isTrue()
protected boolean asn1Equals(ASN1Primitive o)
public int hashCode()
ObjectObject.equals(java.lang.Object) returns true must return
the same hash code value. This means that subclasses of Object
usually 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
hashCode method
if you intend implementing your own hashCode method.
hashCode in class ASN1PrimitiveObject.equals(java.lang.Object)public String toString()
ObjectgetClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString method
if you intend implementing your own toString method.