Java Reference
In-Depth Information
130:athrow
131:return
Exceptiontable:
from to targettype
4 44 55 Classjava/lang/IndexOutOfBoundsException
4 44 76 Classjava/io/FileNotFoundException
4 44 97 Classjava/io/IOException
4 44 118 any
55 65 118 any
76 86 118 any
97 107 118 any
118 120 118 any
The code for the try block ranges from location 4 up to (but not including location) 44.
4:new #2;//classjava/io/FileReader
7:dup
8:aload_0
9:iconst_0
10:aaload
11:invokespecial #3;//Methodjava/io/FileReader."<init>":
(Ljava/lang/String;)V
14:astore_1
15:new #4;//classjava/io/FileWriter
18:dup
19:aload_0
20:iconst_1
21:aaload
22:invokespecial #5;//Methodjava/io/FileWriter."<init>":
(Ljava/lang/String;)V
25:astore_2
26:aload_1
27:invokevirtual #6;//Methodjava/io/FileReader.read:()I
30:dup
31:istore_3
32:iconst_m1
33:if_icmpeq 44
36:aload_2
37:iload_3
38:invokevirtual #7;//Methodjava/io/FileWriter.write:(I)V
41:goto26
Much of the exception handling control is specified in the exception table:
from to targettype
4 44 55 Classjava/lang/IndexOutOfBoundsException
4 44 76 Classjava/io/FileNotFoundException
4 44 97 Classjava/io/IOException
4 44 118 any
55 65 118 any
76 86 118 any
97 107 118 any
118 120 118 any
The rst entry,
4 44 55 Classjava/lang/IndexOutOfBoundsException
says that the exception handling applies to locations 4 up to (but not including) 44; con-
trol is transferred to location 55 if and when an exception of the given type ( java.lang.
IndexOutOfBoundsException here) is raised. This entry captures the control for the first
catch-clause. Similarly, the next two table entries,
4 44 76 Classjava/io/FileNotFoundException
 
Search WWH ::




Custom Search