Package org.xipki.pkcs11.wrapper.attrs
Class CharArrayAttribute
- java.lang.Object
-
- org.xipki.pkcs11.wrapper.attrs.Attribute
-
- org.xipki.pkcs11.wrapper.attrs.CharArrayAttribute
-
public class CharArrayAttribute extends Attribute
Objects of this class represent a char-array 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 CharArrayAttribute(long type)Constructor taking the PKCS#11 type of the attribute.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CharArrayAttributecharArrayValue(char[] value)Set the char-array value of this attribute.StringgetValue()Get the string value of this attribute.protected StringgetValueString()Get a string representation of the value of this attribute.CharArrayAttributestringValue(String value)Set the char-array value of this attribute.-
Methods inherited from class org.xipki.pkcs11.wrapper.attrs.Attribute
ckAttribute, getCkAttribute, getInstance, getInstance, getType, isNullValue, isPresent, isSensitive, present, sensitive, toString, toString, type
-
-
-
-
Method Detail
-
charArrayValue
protected CharArrayAttribute charArrayValue(char[] value)
Set the char-array value of this attribute. Null, is also valid. A call to this method sets the present flag to true.- Parameters:
value- The char-array value to set. May be null.- Returns:
- a reference to this object.
-
stringValue
public CharArrayAttribute stringValue(String value)
Set the char-array value of this attribute. Null, is also valid. A call to this method sets the present flag to true.- Parameters:
value- The char-array value to set. May be null.- Returns:
- a reference to this object.
-
getValue
public String getValue()
Get the string value of this attribute. Null, is also possible.
-
getValueString
protected String getValueString()
Get a string representation of the value of this attribute.- Overrides:
getValueStringin classAttribute- Returns:
- A string representation of the value of this attribute.
-
-