equal
deleted
inserted
replaced
33 public class Skip { |
33 public class Skip { |
34 public static void main(String argv[]) throws Exception { |
34 public static void main(String argv[]) throws Exception { |
35 File f = new File(System.getProperty("test.src", "."), |
35 File f = new File(System.getProperty("test.src", "."), |
36 "SkipInput.txt"); |
36 "SkipInput.txt"); |
37 FileReader fr = new FileReader(f); |
37 FileReader fr = new FileReader(f); |
38 long nchars = 8200; |
38 try { |
39 long actual = fr.skip(nchars); |
39 long nchars = 8200; |
|
40 long actual = fr.skip(nchars); |
40 |
41 |
41 if (actual > nchars) { |
42 if (actual > nchars) { |
42 throw new Exception |
43 throw new Exception |
43 ("Should skip " + nchars + ", but skipped " +actual+" chars"); |
44 ("Should skip " + nchars + ", but skipped " +actual+" chars"); |
|
45 } |
|
46 } finally { |
|
47 fr.close(); |
44 } |
48 } |
45 } |
49 } |
46 } |
50 } |