|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectopencard.opt.database.DataObject
public class DataObject
| Field Summary | |
|---|---|
static char |
INHIBITOR
|
static char |
SEPARATOR
|
| Constructor Summary | |
|---|---|
DataObject()
|
|
| Method Summary | |
|---|---|
static byte[] |
bodyAPDU(byte[] b)
Builds the body of the APDU command from a byte array. |
static byte[] |
bodyAPDU(java.lang.String c)
Builds the body of the APDU command from a String. |
protected static byte |
charToHex(char c)
Transforms a char into its hexadecimal value. |
protected static java.lang.String[] |
dictionaryResponseToString(char systemTableType,
ResponseAPDU resp)
|
static byte[] |
headerAPDU(byte CLA,
byte INS,
byte P1,
byte P2)
Builds the header of the APDU command. |
static byte[] |
headerAPDU(byte CLA,
byte INS,
byte P1,
byte P2,
byte lc_size)
Builds the header of the APDU command. |
protected static char |
hexToChar(byte b)
Transforms a hexadecimal value into its char value. |
protected static void |
isDictionaryIdentifier(java.lang.String s)
|
protected static void |
isIdentifier(java.lang.String s)
|
protected static boolean |
isOperator(char c)
Test if the character passed as parameter is an operator of comparison or not. |
protected static byte |
operator(java.lang.String condition)
This method converts a string value of an operator into its byte value. |
protected static byte |
parsePrivilege(java.lang.String priv)
This method parses a String describing the privileges
and builds a corresponding byte value. |
protected static java.lang.String[] |
parseString(java.lang.String s)
Allows to parse a string composed of severals parameters into an array of Strings. |
protected static java.lang.String[] |
responseToString(ResponseAPDU resp)
Converts a response APDU sent back by the smartcard into a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final char INHIBITOR
public static final char SEPARATOR
| Constructor Detail |
|---|
public DataObject()
| Method Detail |
|---|
protected static void isIdentifier(java.lang.String s)
throws opencard.opt.database.WrongIdentifierSyntaxException
opencard.opt.database.WrongIdentifierSyntaxException
protected static void isDictionaryIdentifier(java.lang.String s)
throws opencard.opt.database.WrongIdentifierSyntaxException
opencard.opt.database.WrongIdentifierSyntaxExceptionprotected static boolean isOperator(char c)
True if the character
is an operator and False otherwise.
c - The character to be tested.
protected static byte parsePrivilege(java.lang.String priv)
String describing the privileges
and builds a corresponding byte value.
priv - The list of privileges, each privilege is separated from the next one by a coma.
protected static byte operator(java.lang.String condition)
condition - The operator to determine the value, coded
on 1 or 2 characters.
protected static java.lang.String[] dictionaryResponseToString(char systemTableType,
ResponseAPDU resp)
protected static java.lang.String[] responseToString(ResponseAPDU resp)
resp - The response APDU to get the string value of.
protected static java.lang.String[] parseString(java.lang.String s)
s - The String to be parsed.
protected static byte charToHex(char c)
c - The character to transform into its hexadecimal value.
protected static char hexToChar(byte b)
c - The hexadecimal value to transform into its character value.
public static byte[] bodyAPDU(java.lang.String c)
c - The string used to build the ADPU command.
public static byte[] bodyAPDU(byte[] b)
b - The byte array used to build the ADPU command.
public static byte[] headerAPDU(byte CLA,
byte INS,
byte P1,
byte P2)
CLA - Represents the CLA byte value of the APDU command.INS - Represents the INS byte value of the APDU command.P1 - Represents the P1 byte value of the APDU command.P2 - Represents the P2 byte value of the APDU command.
(byte, byte, byte, byte, byte)
public static byte[] headerAPDU(byte CLA,
byte INS,
byte P1,
byte P2,
byte lc_size)
CLA - Represents the CLA byte value of the APDU command.INS - Represents the INS byte value of the APDU command.P1 - Represents the P1 byte value of the APDU command.P2 - Represents the P2 byte value of the APDU command.le_size - Represents the Le byte value of the APDU
command, i.e. the expected length of returned data.
(byte, byte, byte, byte)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||