import java.io.*; import it.unimi.mat.sei.*; public class LettorePrimoCarattere { private FileReader f; public LettorePrimoCarattere( String fileName ) throws FileNotFoundException { f = new FileReader( fileName ); } public char primoCarattere() { char c = '?'; try { c = (char)f.read(); f.close(); } catch ( IOException e ) { IO.alert( "Problemi di lettura..." ); } return c; } }