* configure.ac: New switch for disabling -O2 (--disable-optimizations).
[cacao.git] / tests / filter.java
1 import java.io.*;
2
3
4 public class filter {
5    public static void main(String argv[]) {
6    
7       DataInputStream in = new DataInputStream(System.in);
8
9       
10       try {
11          while (true) {
12             byte b = in.readByte();
13             if (b <= 128) { 
14                int x = b;
15                System.out.println("BYTE: " + x);
16             } else {
17                String x = "non ascii: " + b;
18                System.out.println(x);
19             }
20          }
21       }
22       catch (IOException e) {
23          System.out.println("-- END OF FILE --");
24       }
25       finally {
26          System.out.println("--- Cool finally ---");
27       }
28    }
29 }