//package mytext; import java.io.FileReader; import java.io.IOException; import java.io.*; public class PrintAscii { public static void main( String[] args ) { String myFile = "test.txt"; StringBuffer buf = null; FileReader fr = null; String str = ""; try { fr = new FileReader( myFile ); int n1; buf = new StringBuffer(); while( ( ( n1 = fr.read() ) != -1 ) ) { buf.append( (char) n1 ); str += (char)n1; } // str sotres all output from file reader for (int i=0; i