import java.io.*; import lejos.nxt.*; public class FileReadTest { public static void main(String[] args) { File data = new File("pathB.txt"); String str =""; try { InputStream is = new FileInputStream(data); DataInputStream din = new DataInputStream(is); while (is.available() > 0) { char x = (char)din.read(); str = str + x; } din.close(); } catch (IOException ioe) { LCD.drawString("read exception", 0, 0); } } }