Class AbstractDERTag

java.lang.Object
org.ldaptive.asn1.AbstractDERTag
All Implemented Interfaces:
DERTag
Direct Known Subclasses:
ApplicationDERTag, ContextDERTag, CustomDERTag

public abstract class AbstractDERTag extends Object implements DERTag
Abstract base class for custom DER tag types.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final boolean
    Flag indicating whether value is primitive or constructed.
    private final int
    Tag number.

    Fields inherited from interface org.ldaptive.asn1.DERTag

    ASN_CONSTRUCTED
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractDERTag(int number, boolean isConstructed)
    Creates a new tag with given tag number.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the value of this tag for encoding.
    int
    Gets the decimal value of the tag.
    boolean
    Determines whether the tag is constructed or primitive.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.ldaptive.asn1.DERTag

    name
  • Field Details

    • tagNo

      private final int tagNo
      Tag number.
    • constructed

      private final boolean constructed
      Flag indicating whether value is primitive or constructed.
  • Constructor Details

    • AbstractDERTag

      public AbstractDERTag(int number, boolean isConstructed)
      Creates a new tag with given tag number.
      Parameters:
      number - Tag number.
      isConstructed - True for constructed tag, false otherwise.
  • Method Details

    • getTagNo

      public int getTagNo()
      Description copied from interface: DERTag
      Gets the decimal value of the tag.
      Specified by:
      getTagNo in interface DERTag
      Returns:
      decimal tag number.
    • isConstructed

      public boolean isConstructed()
      Description copied from interface: DERTag
      Determines whether the tag is constructed or primitive.
      Specified by:
      isConstructed in interface DERTag
      Returns:
      true if constructed, false if primitive.
    • getTagByte

      public int getTagByte()
      Description copied from interface: DERTag
      Gets the value of this tag for encoding.
      Specified by:
      getTagByte in interface DERTag
      Returns:
      byte value of this tag
    • toString

      public String toString()
      Overrides:
      toString in class Object