add source code that does not have location annotations.
[IRC.git] / Robust / src / Benchmarks / SSJava / JavaNator / TestSensorInput.java
1 public class TestSensorInput {
2
3   private static FileInputStream inputFile;
4   private static int idx=0;
5
6   @TRUST
7   public static void init() {
8     inputFile = new FileInputStream("input.dat");
9   }
10
11   @TRUST
12   public static byte getCommand() {
13     String in = inputFile.readLine();
14     if (in == null) {
15        return (byte) -1;
16     }
17     // DEBUG_OUTPUT();
18     return (byte) Integer.parseInt(in);
19   }
20   
21   public static DEBUG_OUTPUT(){
22     idx++;
23     System.out.println(idx);
24   }
25
26 }