package mpqareader; import java.io.*; public class PrintChars { public static void main(String[] argv) { try { FileInputStream fis = new FileInputStream(argv[0]); int count = 0; int c = fis.read(); while(c != -1) { String cs; if(c >= 32) cs = "" + (char) c; else if(c == 10) cs = "\\n"; else if(c == 13) cs = "\\r"; else cs = ""; System.out.println(count + "\t|" + cs + "| (" + c + ")"); count++; c = fis.read(); } } catch(Exception e) { e.printStackTrace(); } } }