Example usage for java.io LineNumberInputStream skip

List of usage examples for java.io LineNumberInputStream skip

Introduction

In this page you can find the example usage for java.io LineNumberInputStream skip.

Prototype

public long skip(long n) throws IOException 

Source Link

Document

Skips over and discards n bytes of data from this input stream.

Usage

From source file:Main.java

public static void main(String[] args) throws IOException {

    int i;//w  w w. ja v  a2  s  .c o  m
    FileInputStream fis = new FileInputStream("C:/test.txt");
    LineNumberInputStream lnis = new LineNumberInputStream(fis);

    while ((i = lnis.read()) != -1) {
        char c = (char) i;

        System.out.println(c);

        lnis.skip(1);
    }

}