Class LongAttribute

  • Direct Known Subclasses:
    MechanismAttribute

    public class LongAttribute
    extends Attribute
    Objects of this class represent a long attribute of a PKCS#11 object as specified by PKCS#11.
    Author:
    Karl Scheibelhofer (SIC), Lijun Liao (xipki)
    • Constructor Detail

      • LongAttribute

        public LongAttribute​(long type)
        Constructor taking the PKCS#11 type of the attribute.
        Parameters:
        type - The PKCS#11 type of this attribute; e.g. CKA_VALUE_LEN.
    • Method Detail

      • longValue

        public LongAttribute longValue​(Long value)
        Set the long value of this attribute. Null, is also valid. A call to this method sets the present flag to true.
        Parameters:
        value - The long value to set. May be null.
        Returns:
        a reference to this object.
      • getValue

        public Long getValue()
        Get the long value of this attribute. Null, is also possible.
        Specified by:
        getValue in class Attribute
        Returns:
        The long value of this attribute or null.
      • getIntValue

        public Integer getIntValue()
        Get the int value of this attribute. Null, is also possible.
        Returns:
        The int value of this attribute or null.
      • toString

        public String toString​(int radix)
        Get a string representation of this attribute. The radix for the presentation of the value can be specified; e.g. 16 for hex, 10 for decimal.
        Parameters:
        radix - The radix for the representation of the value.
        Returns:
        A string representation of the value of this attribute.