Site Tools


Smart Card Solution

User Manual

JavaCard API Samples

Java Card Specification

Knowledge Sharing


5. The Export File Format

This chapter describes the export file format. Compliant Java Card Converters must be capable of producing and consuming all export files that conform to the specification provided in this chapter.

An export file consists of a stream of 8-bit bytes. All 16-bit and 32-bit quantities are constructed by reading in two and four consecutive 8-bit bytes, respectively. Multibyte data items are always stored in big-endian order, where the high-order bytes come first.

This chapter defines its own set of data types representing Java Card export file data: the types u1, u2, and u4 represent an unsigned one-, two-, and four-byte quantities, respectively.

The Java Card export file format is presented using pseudo structures written in a C-like structure notation. To avoid confusion with the fields of Java Card virtual machine classes and class instances, the contents of the structures describing the Java Card export file format are referred to as items. Unlike the fields of a C structure, successive items are stored in the Java Card platform file sequentially, without padding or alignment.

Variable-sized tables, consisting of variable-sized items, are used in several export file structures. Although we will use C-like array syntax to refer to table items, the fact that tables are streams of varying-sized structures means that it is not possible to directly translate a table index into a byte offset into the table.

In a data structure that is referred to as an array, the elements are equal in size.

javacard/jcvm/5._the_export_file_format.txt · Last modified: 2017/05/13 04:09 (external edit)