Package org.xipki.pkcs11.wrapper.attrs
Class LongAttribute
- java.lang.Object
-
- org.xipki.pkcs11.wrapper.attrs.Attribute
-
- org.xipki.pkcs11.wrapper.attrs.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)
-
-
Field Summary
-
Fields inherited from class org.xipki.pkcs11.wrapper.attrs.Attribute
ckAttribute, present, sensitive
-
-
Constructor Summary
Constructors Constructor Description LongAttribute(long type)Constructor taking the PKCS#11 type of the attribute.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegergetIntValue()Get the int value of this attribute.LonggetValue()Get the long value of this attribute.LongAttributelongValue(Long value)Set the long value of this attribute.StringtoString(int radix)Get a string representation of this attribute.-
Methods inherited from class org.xipki.pkcs11.wrapper.attrs.Attribute
ckAttribute, getCkAttribute, getInstance, getInstance, getType, getValueString, isNullValue, isPresent, isSensitive, present, sensitive, toString, toString, type
-
-
-
-
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.
-
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.
-
-