Methods Summary |
---|
void | encode(DEROutputStream out)
byte[] bytes = new byte[1];
bytes[0] = value;
out.writeEncoded(BOOLEAN, bytes);
|
public boolean | equals(java.lang.Object o)
if ((o == null) || !(o instanceof DERBoolean))
{
return false;
}
return (value == ((DERBoolean)o).value);
|
public static org.bouncycastle.asn1.DERBoolean | getInstance(java.lang.Object obj)return a boolean from the passed in object.
if (obj == null || obj instanceof DERBoolean)
{
return (DERBoolean)obj;
}
if (obj instanceof ASN1OctetString)
{
// BEGIN android-changed
return getInstance(((ASN1OctetString)obj).getOctets());
// END android-changed
}
if (obj instanceof ASN1TaggedObject)
{
return getInstance(((ASN1TaggedObject)obj).getObject());
}
throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
|
public static org.bouncycastle.asn1.DERBoolean | getInstance(boolean value)return a DERBoolean from the passed in boolean.
return (value ? TRUE : FALSE);
|
public static org.bouncycastle.asn1.DERBoolean | getInstance(byte[] octets)return a DERBoolean from the passed in array.
return (octets[0] != 0) ? TRUE : FALSE;
|
public static org.bouncycastle.asn1.DERBoolean | getInstance(ASN1TaggedObject obj, boolean explicit)return a Boolean from a tagged object.
return getInstance(obj.getObject());
|
public int | hashCode()
return value;
|
public boolean | isTrue()
return (value != 0);
|
public java.lang.String | toString()
return (value != 0) ? "TRUE" : "FALSE";
|