Advertisement
Guest User

IccFileHandler

a guest
Jul 30th, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.24 KB | None | 0 0
  1. public abstract class IccFileHandler extends Handler implements IccConstants {
  2.  
  3.     //from TS 11.11 9.1 or elsewhere
  4.     static protected final int COMMAND_READ_BINARY = 0xb0;
  5.     static protected final int COMMAND_UPDATE_BINARY = 0xd6;
  6.     static protected final int COMMAND_READ_RECORD = 0xb2;
  7.     static protected final int COMMAND_UPDATE_RECORD = 0xdc;
  8.     static protected final int COMMAND_SEEK = 0xa2;
  9.     static protected final int COMMAND_GET_RESPONSE = 0xc0;
  10.  
  11.     // from TS 11.11 9.2.5
  12.     static protected final int READ_RECORD_MODE_ABSOLUTE = 4;
  13.  
  14.     //***** types of files  TS 11.11 9.3
  15.     static protected final int EF_TYPE_TRANSPARENT = 0;
  16.     static protected final int EF_TYPE_LINEAR_FIXED = 1;
  17.     static protected final int EF_TYPE_CYCLIC = 3;
  18.  
  19.     //***** types of files  TS 11.11 9.3
  20.     static protected final int TYPE_RFU = 0;
  21.     static protected final int TYPE_MF  = 1;
  22.     static protected final int TYPE_DF  = 2;
  23.     static protected final int TYPE_EF  = 4;
  24.  
  25.     // size of GET_RESPONSE for EF's
  26.     static protected final int GET_RESPONSE_EF_SIZE_BYTES = 15;
  27.     static protected final int GET_RESPONSE_EF_IMG_SIZE_BYTES = 10;
  28.  
  29.     // Byte order received in response to COMMAND_GET_RESPONSE
  30.     // Refer TS 51.011 Section 9.2.1
  31.     static protected final int RESPONSE_DATA_RFU_1 = 0;
  32.     static protected final int RESPONSE_DATA_RFU_2 = 1;
  33.  
  34.     static protected final int RESPONSE_DATA_FILE_SIZE_1 = 2;
  35.     static protected final int RESPONSE_DATA_FILE_SIZE_2 = 3;
  36.  
  37.     static protected final int RESPONSE_DATA_FILE_ID_1 = 4;
  38.     static protected final int RESPONSE_DATA_FILE_ID_2 = 5;
  39.     static protected final int RESPONSE_DATA_FILE_TYPE = 6;
  40.     static protected final int RESPONSE_DATA_RFU_3 = 7;
  41.     static protected final int RESPONSE_DATA_ACCESS_CONDITION_1 = 8;
  42.     static protected final int RESPONSE_DATA_ACCESS_CONDITION_2 = 9;
  43.     static protected final int RESPONSE_DATA_ACCESS_CONDITION_3 = 10;
  44.     static protected final int RESPONSE_DATA_FILE_STATUS = 11;
  45.     static protected final int RESPONSE_DATA_LENGTH = 12;
  46.     static protected final int RESPONSE_DATA_STRUCTURE = 13;
  47.     static protected final int RESPONSE_DATA_RECORD_LENGTH = 14;
  48.  
  49.  
  50.     //***** Events
  51.  
  52.     /** Finished retrieving size of transparent EF; start loading. */
  53.     static protected final int EVENT_GET_BINARY_SIZE_DONE = 4;
  54.     /** Finished loading contents of transparent EF; post result. */
  55.     static protected final int EVENT_READ_BINARY_DONE = 5;
  56.     /** Finished retrieving size of records for linear-fixed EF; now load. */
  57.     static protected final int EVENT_GET_RECORD_SIZE_DONE = 6;
  58.     /** Finished loading single record from a linear-fixed EF; post result. */
  59.     static protected final int EVENT_READ_RECORD_DONE = 7;
  60.     /** Finished retrieving record size; post result. */
  61.     static protected final int EVENT_GET_EF_LINEAR_RECORD_SIZE_DONE = 8;
  62.     /** Finished retrieving image instance record; post result. */
  63.     static protected final int EVENT_READ_IMG_DONE = 9;
  64.     /** Finished retrieving icon data; post result. */
  65.     static protected final int EVENT_READ_ICON_DONE = 10;
  66.     /** Finished retrieving size of record for EFimg now. */
  67.     static protected final int EVENT_GET_RECORD_SIZE_IMG_DONE = 11;
  68. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement