public class Parameter extends Object implements Serializable, Cloneable
A type and encoding attribute are also available to represent more complex data that is to be sent or received. These might be useful, for example, when transporting a complex binary object.
Example: For an ASN.1-encoded RSA private key the Parameter may be:
| Modifier and Type | Field and Description |
|---|---|
static String |
ENCODING_BASE64_BYTE_ARRAY
Indicates a base64-encoded byte array.
|
static String |
ENCODING_DEFAULT
Default encoding for a Parameter with no set encoding.
|
static String |
ENCODING_HEX_BYTE_ARRAY
Indicates a hex-encoded byte array.
|
static String |
ENCODING_NONE
The encoding type that indicates no specific encoding.
|
static String |
TYPE_BYTEARRAY
Indicates the value is natively a byte[].
|
static String |
TYPE_DEFAULT
Default type for a Parameter: "String".
|
static String |
TYPE_INTEGER
Indicates the value is natively an integer.
|
static String |
TYPE_LONG
Indicates the value is natively a long.
|
static String |
TYPE_STRING
Indicates the value is natively a String.
|
| Constructor and Description |
|---|
Parameter()
Constructor.
|
Parameter(String id,
char[] value)
Constructor.
|
Parameter(String encoding,
String id,
String type,
char[] value)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
boolean |
equals(Object obj) |
String |
getEncoding()
Returns the encoding of the Parameter or "NONE" if not encoded.
|
String |
getId()
Returns this Parameter's identifier or null if not set.
|
String |
getType()
Returns the type of the Parameter.
|
char[] |
getValue()
Returns this Parameter's value or null if not set.
|
int |
hashCode() |
void |
reset()
Clear value
|
void |
setEncoding(String encoding)
Sets the encoding of the Parameter.
|
void |
setId(String id)
Sets the Parameter's identifier.
|
void |
setType(String type)
Sets the type of the Parameter.
|
void |
setValue(char[] value)
Sets the Parameter's value.
|
String |
toString() |
public static final String ENCODING_NONE
public static final String ENCODING_BASE64_BYTE_ARRAY
public static final String ENCODING_HEX_BYTE_ARRAY
public static final String ENCODING_DEFAULT
ENCODING_NONE,
Constant Field Valuespublic static final String TYPE_BYTEARRAY
public static final String TYPE_STRING
public static final String TYPE_LONG
public static final String TYPE_INTEGER
public static final String TYPE_DEFAULT
public Parameter()
public Parameter(String id, char[] value)
id - the Parameter's identifiervalue - the Parameter's valuepublic String getId()
public char[] getValue()
public void setId(String id)
id - the Parameter's identifierpublic void setValue(char[] value)
value - the Parameter's valuepublic String toString()
toString in class ObjectObject.toString()public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionObject.clone()public String getEncoding()
public void setEncoding(String encoding)
encoding - the encoding of the Parameterpublic String getType()
public void setType(String type)
type - the type of the Parameterpublic void reset()
Copyright © 2005-2020 HID Global Corporation/ASSA ABLOY AB.