com.ibm.jc.tools
Class OPKeyData
java.lang.Object
com.ibm.util.getopt.ArgEater
com.ibm.util.getopt.Data
com.ibm.util.getopt.StringData
com.ibm.jc.tools.OPKeyData
- public class OPKeyData
- extends com.ibm.util.getopt.StringData
This GetOpt elements parses a OPKey spec.
It might either refer to a full APDU or only part of it.
The data of the APDU can be specified either in hexadecimal form
as as strings. You can mix both representations.
|
Field Summary |
static int |
KEYDEF
Parse key definitions (set/id/type/data) |
static int |
KEYREF
Parse key references (set/id) |
static int |
KEYREFDEF
Parse key definitions/references |
static java.lang.String |
SYNTAX
|
| Fields inherited from class com.ibm.util.getopt.StringData |
resetString, string |
| Fields inherited from class com.ibm.util.getopt.Data |
description, mnemo |
| Fields inherited from class com.ibm.util.getopt.ArgEater |
DASHDASH, DASHDASH_IF_NO_OPTION |
|
Constructor Summary |
OPKeyData(java.lang.String mnemo,
java.lang.String description,
java.lang.String defaultVal,
int mode)
|
| Methods inherited from class com.ibm.util.getopt.StringData |
addToArgv, getString, makeDataPanel |
| Methods inherited from class com.ibm.util.getopt.Data |
getDescription, getMnemo, makeControlPanel, print |
| Methods inherited from class com.ibm.util.getopt.ArgEater |
addPanels, available, joinArgv, quoteArg, splitIntoArgv, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
KEYREFDEF
public static final int KEYREFDEF
- Parse key definitions/references
- See Also:
- Constant Field Values
KEYREF
public static final int KEYREF
- Parse key references (set/id)
- See Also:
- Constant Field Values
KEYDEF
public static final int KEYDEF
- Parse key definitions (set/id/type/data)
- See Also:
- Constant Field Values
SYNTAX
public static final java.lang.String SYNTAX
- See Also:
- Constant Field Values
OPKeyData
public OPKeyData(java.lang.String mnemo,
java.lang.String description,
java.lang.String defaultVal,
int mode)
toString
public static java.lang.String toString(OPKey key)
- Returns:
- a string representation of the specified key.
parseKey
public static byte[] parseKey(java.lang.String s,
int[] set_id_type,
int mode)
- Parse a string and return a byte array.
- Parameters:
s - the string containing either the key reference or defintionset_id_type - either an array of length 2 or 3. If length 2 then
key references are parsed. Index 0 receives key set and
index 1 the key id. If length is 3 then parse key definitions.
Indices 0 and 1 are as described above. Index 2 receives the
key type.
- Returns:
- the parse key material if set_id_type has length 3. Otherwise return
null.
reset
public void reset()
getValue
public java.lang.Object getValue()
setValue
public void setValue(java.lang.Object o)
getKeySet
public int getKeySet()
getKeyId
public int getKeyId()
getKeyType
public int getKeyType()
getKeyMaterial
public byte[] getKeyMaterial()
getKey
public OPKey getKey()
parse
public int parse(java.util.Vector argv,
int pos)
throws com.ibm.util.getopt.GetOptException
- Throws:
com.ibm.util.getopt.GetOptException
Copyright (c) 2004, 2006 International Business Machines Corporation. All Rights Reserved.