BufferedInputStream in = new BufferedInputStream(new FileInputStream("x.txt"));byte[] ab = new byte[128];int iLen = 0;while (iLen > -1) { iLen = in.read(ab, 0, iLen); System.out.println(new String(ab));}in.close();