Description of StringHandlingApp Applet

The StringHandlingApp applet uses javacardx.annotations.StringDef and javacardx.annotations.StringPool annotations. It defines its own set of string constants and also imports a string constant from the main library, StringHandlingLib. The StringHandlingApp applet demonstrates how you can use two applets in different contexts both importing a single string constant from a common library. The StringHandlingApp applet imports and uses one of the same string constants from StringHandlingLib as the StringUtilApp applet.

The StringHandlingApp applet imports a string constant from the StringHandlingLib, and also defines string constants for itself. When the StringHandlingApp is selected, the process method uses the test methods defined in the StringHandlingLib library. If the results from each of the tested methods match the expected string constants defined in the applet, it creates a response message containing a Hello World! message with a copy of the incoming message appended to the end. In the case that the tested methods do not produce the expected outcome, it sends a message containing the header bytes from the buffer with a copy of the incoming message appended to the end.