Java tutorial
import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.InputStream; public class Main { public static void main(String[] args) throws Exception { InputStream is = new FileInputStream("C:/test.txt"); // input stream is converted to buffered input stream BufferedInputStream bis = new BufferedInputStream(is); // read until a single byte is available while (bis.available() > 0) { // skip single byte from the stream bis.skip(1); // read next available byte and convert to char char c = (char) bis.read(); System.out.print(c); } } }