List of usage examples for java.io CharArrayReader skip
public long skip(long n) throws IOException
From source file:Main.java
public static void main(String[] args) throws Exception { char[] ch = { 'A', 'B', 'C', 'D', 'E' }; CharArrayReader car = new CharArrayReader(ch); int value = 0; // read till the end of the stream while ((value = car.read()) != -1) { // convert integer to char char c = (char) value; // print characters System.out.print(c + "; "); // skip single character long l = car.skip(1); System.out.println("Characters Skipped : " + l); }/*w ww .j av a 2s . co m*/ }