Class ReasonFlags


  • public class ReasonFlags
    extends java.lang.Object
    Represent the CRL Reason Flags.

    This extension, if present, defines the identifies the reason for the certificate revocation.

    Version:
    1.3
    Author:
    Hemma Prafullchandra
    See Also:
    Extension, CertAttrSet
    • Constructor Summary

      Constructors 
      Constructor Description
      ReasonFlags​(boolean[] reasons)
      Create a ReasonFlags with the passed bit settings.
      ReasonFlags​(byte[] reasons)
      Create a ReasonFlags with the passed bit settings.
      ReasonFlags​(BitArray reasons)
      Create a ReasonFlags with the passed bit settings.
      ReasonFlags​(DerInputStream in)
      Create the object from the passed DER encoded value.
      ReasonFlags​(DerValue derVal)
      Create the object from the passed DER encoded value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete​(java.lang.String name)
      Delete the attribute value.
      void encode​(DerOutputStream out)
      Write the extension to the DerOutputStream.
      java.lang.Object get​(java.lang.String name)
      Get the attribute value.
      java.util.Enumeration<java.lang.String> getElements()
      Return an enumeration of names of attributes existing within this attribute.
      void set​(java.lang.String name, java.lang.Object obj)
      Set the attribute value.
      java.lang.String toString()
      Returns a printable representation of the ReasonFlags.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ReasonFlags

        public ReasonFlags​(byte[] reasons)
        Create a ReasonFlags with the passed bit settings.
        Parameters:
        reasons - the bits to be set for the ReasonFlags.
      • ReasonFlags

        public ReasonFlags​(boolean[] reasons)
        Create a ReasonFlags with the passed bit settings.
        Parameters:
        reasons - the bits to be set for the ReasonFlags.
      • ReasonFlags

        public ReasonFlags​(BitArray reasons)
        Create a ReasonFlags with the passed bit settings.
        Parameters:
        reasons - the bits to be set for the ReasonFlags.
      • ReasonFlags

        public ReasonFlags​(DerInputStream in)
                    throws java.io.IOException
        Create the object from the passed DER encoded value.
        Parameters:
        in - the DerInputStream to read the ReasonFlags from.
        Throws:
        java.io.IOException - on decoding errors.
      • ReasonFlags

        public ReasonFlags​(DerValue derVal)
                    throws java.io.IOException
        Create the object from the passed DER encoded value.
        Parameters:
        derVal - the DerValue decoded from the stream.
        Throws:
        java.io.IOException - on decoding errors.
    • Method Detail

      • set

        public void set​(java.lang.String name,
                        java.lang.Object obj)
                 throws java.io.IOException
        Set the attribute value.
        Throws:
        java.io.IOException
      • get

        public java.lang.Object get​(java.lang.String name)
                             throws java.io.IOException
        Get the attribute value.
        Throws:
        java.io.IOException
      • delete

        public void delete​(java.lang.String name)
                    throws java.io.IOException
        Delete the attribute value.
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Returns a printable representation of the ReasonFlags.
        Overrides:
        toString in class java.lang.Object
      • encode

        public void encode​(DerOutputStream out)
                    throws java.io.IOException
        Write the extension to the DerOutputStream.
        Parameters:
        out - the DerOutputStream to write the extension to.
        Throws:
        java.io.IOException - on encoding errors.
      • getElements

        public java.util.Enumeration<java.lang.String> getElements()
        Return an enumeration of names of attributes existing within this attribute.