===== 6.3 Header Component ===== The Header Component contains general information about this CAP file and the package it defines. It is described by the following variable-length structure: The items in the **header_component** structure are as follows: **tag** The **tag** item has the value **COMPONENT_Header** (1). **size** The ******size****** item indicates the number of bytes in the **header_component** structure, excluding the **tag** and ******size****** items. The value of the ******size****** item must be greater than zero. **magic** The ****magic**** item supplies the ****magic**** number identifying the Java Card CAP file format; it has the value **0xDECAFFED**. **minor_version, major_version** The **minor_version** and **major_version** items are the minor and major version numbers of this CAP file. Together, a major and a minor version number determine the version of the CAP file format. If a CAP file has the major version number of M and minor version number of m, the version of the CAP file's format is M.m. A change in the major version number indicates a major incompatibility change, one that requires a fundamentally different Java Card virtual machine. A Java Card virtual machine is not required to support CAP files with different major version numbers. A Java Card virtual machine is required to support CAP files having a given major version number and all valid minor version numbers in the range 0 through some particular **minor_version** where a valid minor version number is a minor version number that has been defined in a version of the Java Card virtual machine specification. In this specification, the major version of the CAP file format has the value ****2**** and the minor version has the value ****2****. Only Sun Microsystems, Inc. may define the meaning and values of new CAP file format versions. **flags** The ****flags**** item is a mask of modifiers that apply to this package. The ****flags**** modifiers are shown in the following table. Flags Value ACC_INT 0x01 ACC_EXPORT 0x02 ACC_APPLET 0x04 The ACC_INT flag has the value of one if the Java int type is used in this package. The int type is used if one or more of the following is present: *a parameter to a method of type int, *a parameter to a method of type int array, *a local variable of type int, *a local variable of type int array, *a field of type int, *a field of type int array, *an instruction of type int, or *an instruction of type int array. Otherwise the **ACC_INT** flag has the value of **0**. The **ACC_EXPORT** flag has the value of **one** if an Export Comp**one**nt ([[6.12_Export Comp**one**nt| Section 6.12, Export Comp**one**nt]]) is included in this CAP file. Otherwise it has the value of 0. The **ACC_APPLET** flag has the value of **one** if an Applet Comp**one**nt ([[6.5_Applet Comp**one**nt| Section 6.5, Applet Comp**one**nt]]) is included in this CAP file. Otherwise it has the value of **0**. All other bits in the flags item not defined in [[6._The_CAP_File_Format| TABLE 6-4]] are reserved for future use. Their values must be **zero**. **package** The **package** item describes the **package** defined in this CAP file. It is represented as a **package**_info structure: The items in the **package_info** structure are as follows: ** minor_version, major_version** The **minor_version** and major_version items are the minor and major version numbers of this package. These values uniquely identify the particular implementation of this package and indicate the binary compatibility between packages. See [[4.5_Package Versions| Section 4.5, Package Versions]] for a description of assigning and using package version numbers. ** AID_length** The **AID_length** item represents the number of bytes in the AID item. Valid values are between 5 and 16, inclusive. AID[] The **AID** item represents the Java Card platform name of the package. See ISO 7816-5 for the definition of an **AID** ([[4.2_**AID**-based Naming| Section 4.2, **AID**-based Naming]]). **package_name** The **package_name** item describes the name of the package defined in this CAP file. It is represented as a **package_name**_info[] structure: The items in the **package_name_info[]** structure are as follows: ** name_length** The **name_length** item is the number of bytes used in the name item to represent the name of this package in UTF-8 format. The value of this item may be zero if and only if the package does not define any remote interfaces or remote classes. ** name[]** The **name[]** item is a variable length representation of the fully qualified name of this package in UTF-8 format. The fully qualified name is represented in internal form as described in **//Java Virtual Machine Specification//** (Section 4.2).