private LineNumberReader getReader ( ) throws FileNotFoundException { if ( writer != null ) { throw Context . reportRuntimeError ( "already writing file \"" + name + "\"" ) ; } if ( reader == null ) reader = new LineNumberReader ( file == null ? new InputStreamReader ( System . in ) : new FileReader ( file ) ) ; return reader ; }
Get the reader checking that we re not already writing this file .