switched RandomAccessFile in FileReader to BufferedInputStream wrapping FileInputStream