Class file
Class file is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) | ||||||
|---|---|---|---|---|---|---|---|---|
a 32-bit integer value (big endian). | 32 (4 bytes) | |||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||
a list of elements. The number of elements in the list is the difference between Constant pool count of Class file and 1. The particular choice is based on a 8-bit value preceeding the actual encoded value. If 7, then Class cp info will be choosen. If 6, then Double cp info will be choosen. If 9, then Field ref cp info will be choosen. If 4, then Float cp info will be choosen. If 3, then Integer cp info will be choosen. If 11, then Interface method ref cp info will be choosen. If 10, then Method ref cp info will be choosen. If 12, then Name and type cp info will be choosen. If 8, then String cp info will be choosen. If 1, then Utf8 cp info will be choosen. | (unknown) | |||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||
a 32-bit integer value (little endian). The number of elements in the list is Interfaces count of Class file. | Interfaces count of Class file times 32 | |||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||
The number of elements in the list is Field count of Class file. | (unknown) | |||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||
The number of elements in the list is Method count of Class file. | (unknown) | |||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||
The number of elements in the list is Attribute count of Class file. The particular type of data structure is selected based on the value of 16 leading bits. These bits are interpreted as an unsigned int. The table below lists the conditions, and the data structure assumed when these conditions are met.
| (unknown) |
Class cp info
Class cp info is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 16-bit integer value (big endian). | 16 (2 bytes) |
Double cp info
Double cp info is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 64-bit integer value (big endian). | 64 (8 bytes) |
Field ref cp info
Field ref cp info is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 16-bit integer value (big endian). | 16 (2 bytes) | |
a 16-bit integer value (big endian). | 16 (2 bytes) |
Float cp info
Float cp info is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 32-bit integer value (big endian). | 32 (4 bytes) |
Integer cp info
Integer cp info is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 32-bit integer value (big endian). | 32 (4 bytes) |
Interface method ref cp info
Interface method ref cp info is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 16-bit integer value (big endian). | 16 (2 bytes) | |
a 16-bit integer value (big endian). | 16 (2 bytes) |
Method ref cp info
Method ref cp info is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 16-bit integer value (big endian). | 16 (2 bytes) | |
a 16-bit integer value (big endian). | 16 (2 bytes) |
Name and type cp info
Name and type cp info is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 16-bit integer value (big endian). | 16 (2 bytes) | |
a 16-bit integer value (big endian). | 16 (2 bytes) |
String cp info
String cp info is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 16-bit integer value (big endian). | 16 (2 bytes) |
Utf8 cp info
Utf8 cp info is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 16-bit integer value (big endian). | 16 (2 bytes) | |
A sequence of characters, encoded in ASCII. The number of characters of the string is Length of Utf8 cp info. | 8 times Length of Utf8 cp info |
Constant value
Constant value is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 32-bit integer value (big endian). | 32 (4 bytes) | |
a 16-bit integer value (big endian). | 16 (2 bytes) |
Synthetic
Synthetic is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 32-bit integer value (big endian). | 32 (4 bytes) |
Deprecated
Deprecated is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 32-bit integer value (big endian). | 32 (4 bytes) |
Field info
Field info is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||||
Constant value, Synthetic or Deprecated. The number of elements in the list is Attributes count of Field info. The particular type of data structure is selected based on the value of 16 leading bits. These bits are interpreted as an unsigned int. The table below lists the conditions, and the data structure assumed when these conditions are met.
| (unknown) |
Line number table entry
Line number table entry is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 16-bit integer value (big endian). | 16 (2 bytes) | |
a 16-bit integer value (big endian). | 16 (2 bytes) |
Line number table
Line number table is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 32-bit integer value (big endian). | 32 (4 bytes) | |
a 16-bit integer value (big endian). | 16 (2 bytes) | |
The number of elements in the list is Line number table length of Line number table. | Line number table length of Line number table times 32 |
Local variable table entry
Local variable table entry is composed out of several other smaller elements. The table below provides an overview.
Local variable table
Local variable table is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 32-bit integer value (big endian). | 32 (4 bytes) | |
a 16-bit integer value (big endian). | 16 (2 bytes) | |
The number of elements in the list is Local variable table length of Local variable table. | Local variable table length of Local variable table times 80 |
Code
Code is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) | ||||||
|---|---|---|---|---|---|---|---|---|
a 32-bit integer value (big endian). | 32 (4 bytes) | |||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||
a 32-bit integer value (big endian). | 32 (4 bytes) | |||||||
a 8-bit integer value (little endian). The number of elements in the list is Code length of Code. | Code length of Code times 8 | |||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||
Line number table or Local variable table. The number of elements in the list is Attributes count of Code. The particular type of data structure is selected based on the value of 16 leading bits. These bits are interpreted as an unsigned int. The table below lists the conditions, and the data structure assumed when these conditions are met.
| (unknown) |
Exceptions
Exceptions is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 32-bit integer value (big endian). | 32 (4 bytes) | |
a 16-bit integer value (big endian). | 16 (2 bytes) | |
a 32-bit integer value (little endian). The number of elements in the list is Number of exceptions of Exceptions. | Number of exceptions of Exceptions times 32 |
Method info
Method info is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||||||
a 16-bit integer value (big endian). | 16 (2 bytes) | |||||||||||
a data structure selected from a list of 4. The number of elements in the list is Attributes count of Method info. The particular type of data structure is selected based on the value of 16 leading bits. These bits are interpreted as an unsigned int. The table below lists the conditions, and the data structure assumed when these conditions are met.
| (unknown) |
Source file
Source file is composed out of several other smaller elements. The table below provides an overview.
Name | Description | Size (in bits) |
|---|---|---|
a 32-bit integer value (big endian). | 32 (4 bytes) | |
a 16-bit integer value (big endian). | 16 (2 bytes) |
