// Std.java -- read the standard input stream as text import java.io.*; public class Std { public static void main (final String[] args) throws Exception { // System.in is java.io.InputStream // System.out is java.io.PrintStream final InputStreamReader reader = new InputStreamReader (System.in, "LATIN-1"); for (;;) { final int c = reader.read(); // read one character if (c == -1) break; } } }