Documentation



Java Card 3 Platform Development Kit User Guide, Classic Edition

Description of StringUtilApp Applet

StringUtilApp uses javacardx.framework.string.StringUtil class and combines the use of:

  • String annotations

  • String constants from the StringHandlingLib and StringHandlingLibLocal libraries

  • Methods from the StringUtil class

It imports string constants from one library, StringHandlingLibLocal, that are in turn imports of constants from another library, StringHandlingLib. In addition, it also helps demonstrate how two applets can have different contexts but both access the same string constant from a common library. It imports and uses one of the same string constants from StringHandlingLib as the StringHandlingApp applet.

The StringUtilApp process method handles APDUs containing a command string composed of a command type and optional arguments. It sends a response APDU based on the command string it received. Contained in this applet's string pool are string constants defining stored items. Command and response strings are represented as a series of bytes following a utf-8 representation of strings.

Close Window

Table of Contents

Java Card: 3 Platform Development Kit User Guide, Classic Edition

Expand | Collapse