added smaller version of directo for something in between tiny and full tests of...
[IRC.git] / Robust / src / Benchmarks / mlp / directto / mlp-small-for-testing / ReadWrite.java
1 // This class is the connection between the input and the output threads, 
2 // synchronizing the two threads
3
4 //import java.io.*;
5 //import java.util.*;
6
7 public class ReadWrite {
8
9   public ReadWrite() {}
10
11   public void read(D2 d2) {
12     FileInputStream in = new FileInputStream( "input4.txt" );
13
14     while(true) {
15       String line=in.readLine();
16       
17       if(line==null)
18         System.exit(0);             
19       
20       if(d2.getMessageList().setMessage(line))
21         break;
22     }
23
24     System.out.println("Input data read.");
25     System.out.println("Data set read");
26   }   
27
28   public void write(D2 d2) {
29     d2.getStatic().printInfo();
30     d2.getFixList().printInfo();
31     d2.getAircraftList().printInfo();   
32     d2.getFlightList().printInfo();
33   }
34 }