Class BooleanValue

java.lang.Object
net.aifusion.asn.AsnValue
net.aifusion.asn.BooleanValue

public class BooleanValue extends AsnValue
ASN.1 Boolean value
Author:
Sharad Singhal
  • Constructor Details

    • BooleanValue

      public BooleanValue(boolean b)
      ASN.1 Boolean value
      Parameters:
      b - - value for this Boolean value
  • Method Details

    • create

      public static BooleanValue create(byte[] buffer, int blen, int cursor)
      Create a Boolean value from a serialized value
      Parameters:
      buffer - - input buffer
      blen - - length of input buffer
      cursor - - starting location for the integer value
      Returns:
      - IntegerValue
      See Also:
    • getValue

      public boolean getValue()
      Get the value of this Boolean
      Returns:
      true if this Boolean is true, false otherwise
    • toAsnString

      public String toAsnString(String prefix)
      Description copied from class: AsnValue
      Get a (semi) ASN.1 notation for this value.
      Overrides:
      toAsnString in class AsnValue
      Parameters:
      prefix - - prefix to add to each line
      Returns:
      - string containing the ASN.1 value
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getEncodedValue

      public byte[] getEncodedValue()
      Description copied from class: AsnValue
      Get the encoded value for this ASN.1 value. This method should be implemented by subclasses to provide the encoded ASN.1 value
      Specified by:
      getEncodedValue in class AsnValue
      Returns:
      byte [] containing encoded value for this ASN.1 value (including tag, length, content)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object