An in-depth understanding of Java Virtual Machine notes---class file structure overview

Source: Internet
Author: User
A class file is a set of binary streams that are based on 8-bit bytes, and each data item is tightly arranged in a class file with no delimiters in the middle. When a data item that requires more than 8 bytes is encountered, it is stored in a number of 8-bit bytes in the way it was before the high-bit.
According to the Java Virtual Machine specification, the class file format is stored in a pseudo-structure similar to the C language structure, with only two data types: unsigned number and table. Unsigned numbers are based on data types, with U1, U2, U4, U8, respectively, code 1 bytes, 2 bytes, 4 bytes, 8 bytes of unsigned numbers, unsigned numbers can be used to describe numbers, index references, quantity values, or string values that are composed of UTF-8 encodings. A table is a composite data type consisting of multiple symbols or other tables as data items, all of which habitually end with "_info". Tables are used to describe the hierarchical structure of a complex, and the entire class file is essentially a table, which consists of the following data items:

Whether it is an unsigned number or a table, when you need to describe the same type but a variable number of data, often use a predecessor capacity counter plus a number of consecutive data items, this time called a series of continuous data of a certain type of a set.

An in-depth understanding of Java Virtual Machine notes---class file structure overview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.