InputStream input = new FileInputStream("c:datainput-file.txt"); int data = input.read(); while(data != -1){ data = input.read(); }