equal
deleted
inserted
replaced
36 |
36 |
37 public class Read { |
37 public class Read { |
38 public static void main(String[] args) throws Exception { |
38 public static void main(String[] args) throws Exception { |
39 ObjectInputStream oin = |
39 ObjectInputStream oin = |
40 new ObjectInputStream(new FileInputStream("tmp.ser")); |
40 new ObjectInputStream(new FileInputStream("tmp.ser")); |
41 Object[] array = (Object[]) oin.readObject(); |
41 try { |
42 if (! (array[0].equals("before") && array[2].equals("after"))) { |
42 Object[] array = (Object[]) oin.readObject(); |
43 throw new Error(); |
43 if (! (array[0].equals("before") && array[2].equals("after"))) { |
|
44 throw new Error(); |
|
45 } |
|
46 } finally { |
|
47 oin.close(); |
44 } |
48 } |
45 } |
49 } |
46 } |
50 } |