add input sensor data file
[IRC.git] / Robust / src / Benchmarks / SSJava / JavaNator / TestSensorInput.java
1 public class TestSensorInput {
2
3   private static FileInputStream inputFile;
4
5   public static void init() {
6     inputFile = new FileInputStream("input.dat");
7   }
8
9   public static byte getCommand() {
10     String in = inputFile.readLine();
11     if (in == null) {
12       return (byte) -1;
13     }
14     return (byte) Integer.parseInt(in);
15   }
16
17 }