convert from svn repository: remove tags directory
[lttv.git] / trunk / masters-pmf / java_speed_test / java / read_trace.java
index 99cab41dc772451efe4aed1b073914513fd05916..aacb08eb164835161b21c9ea6dbbbdd377b35b02 100644 (file)
@@ -3,10 +3,27 @@ import java.io.*;
 public class read_trace {
        public static void main(String[] args) {
                int tmp = 0;
+               boolean print = false;
+               String filename = "";
+
+               for(String s : args) {
+                       if(s.equals("-p")) {
+                               print = true;
+                       }
+                       else {
+                               filename = s;
+                       }
+               }
+               
+               if(filename.equals("")) {
+                       System.out.println("error: no filename specified");
+                       return;
+               }
 
                try {
-                       FileInputStream file_input = new FileInputStream ("../trace.dat");
-                       DataInputStream data_input = new DataInputStream (file_input);
+                       FileInputStream file_input = new FileInputStream (filename);
+                       BufferedInputStream buffered_input = new BufferedInputStream(file_input);
+                       DataInputStream data_input = new DataInputStream (buffered_input);
                        
                        int timestamp;
                        short id;
This page took 0.022751 seconds and 4 git commands to generate.