Class ContextType

All Implemented Interfaces:
DEREncoder

public class ContextType extends AbstractDERType implements DEREncoder
Converts context types to their DER encoded format.
  • Field Details

    • derItem

      private final byte[] derItem
      Data to encode.
  • Constructor Details

    • ContextType

      public ContextType(int index, byte[] item)
      Creates a new context type.
      Parameters:
      index - of this item in the context
      item - to encode
    • ContextType

      public ContextType(int index, String item)
      Creates a new context type.
      Parameters:
      index - of this item in the context
      item - to encode
    • ContextType

      public ContextType(int index, boolean item)
      Creates a new context type.
      Parameters:
      index - of this item in the context
      item - to encode
    • ContextType

      public ContextType(int index, BigInteger item)
      Creates a new context type.
      Parameters:
      index - of this item in the context
      item - to encode
  • Method Details

    • encode

      public byte[] encode()
      Description copied from interface: DEREncoder
      Encode this object into it's DER type.
      Specified by:
      encode in interface DEREncoder
      Returns:
      DER encoded object