Clover Coverage Report - Maven Impex Plugin 1.0.22-SNAPSHOT
Coverage timestamp: Mon Jul 18 2011 09:37:20 EDT
../../../../img/srcFileCovDistChart0.png 10% of files have more coverage
15   31   3   15
2   28   0.2   1
1     3  
1    
 
  Tail       Line # 9 15 0% 3 18 0% 0.0
 
No Tests
 
1    package org.apache.torque.mojo;
2   
3    import java.io.File;
4    import java.io.FileInputStream;
5    import java.io.FileOutputStream;
6    import java.io.InputStream;
7    import java.io.OutputStream;
8   
 
9    public class Tail {
 
10  0 toggle public static void main(String[] args) {
11  0 try {
12  0 int display = 3 * 1024;
13  0 String filename = "C:/temp/old.xml";
14  0 File file = new File(filename);
15  0 long length = file.length();
16  0 InputStream in = new FileInputStream(file);
17  0 in.skip(length - display);
18  0 OutputStream out = new FileOutputStream("C:/temp/tail.txt");
19  0 byte[] buffer = new byte[1024];
20  0 int readLength = 0;
21  0 while ((readLength = in.read(buffer, 0, buffer.length)) != -1) {
22  0 out.write(buffer, 0, readLength);
23    }
24  0 in.close();
25  0 out.close();
26    } catch (Throwable t) {
27  0 t.printStackTrace();
28    }
29    }
30   
31    }