1 # 2 # sample small-but-valid classfile 3 # 4 5 cafe babe # magic 6 0000 # minor_version 7 002e # major_version 8 000d # constant_pool_count 9 10 # 11 # constant_pool 12 # 13 07 0003 # 0001: class[Small] 14 07 0004 # 0002: class[java/lang/Object] 15 01 0005 "Small" # 0003: utf8["Small"] 16 01 0010 "java/lang/Object" # 0004: utf8["java/lang/Object"] 17 01 0005 "blort" # 0005: utf8["blort"] 18 01 0003 "()V" # 0006: utf8["()V"] 19 01 0004 "Code" # 0007: utf8["Code"] 20 01 0012 "LocalVariableTable" # 0008: utf8["LocalVariableTable"] 21 01 0003 "foo" # 0009: utf8["foo"] 22 01 0003 "bar" # 000a: utf8["bar"] 23 01 0003 "baz" # 000b: utf8["baz"] 24 01 0002 "[I" # 000c: utf8["[I"] 25 26 0001 # access_flags 27 0001 # this_class 28 0002 # super_class 29 0000 # interfaces_count 30 0000 # fields_count 31 0001 # methods_count 32 33 # methods[0] 34 0001 # access_flags 35 0005 # name 36 0006 # descriptor 37 0001 # attributes_count 38 # attributes[0] 39 0007 # name 40 00000034 # length 41 0001 # max_stack 42 0002 # max_locals 43 00000002 # code_length 44 b1 # 0000: return 45 b1 # 0001: return 46 0000 # exception_table_length 47 0001 # attributes_count 48 # attributes[0] 49 0008 # name 50 00000020 # length 51 0003 # local_variable_table_length 52 0000 0002 0009 000c 0000 # 0000..0002 foo:[I #0000 53 0000 0001 000a 000c 0001 # 0000..0001 bar:[I #0001 54 0001 0001 000b 000c 0001 # 0001..0002 baz:[I #0001 55 56 0000 # attributes_count 57