Example usage for java.io LineNumberInputStream setLineNumber

List of usage examples for java.io LineNumberInputStream setLineNumber

Introduction

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

Prototype

public void setLineNumber(int lineNumber) 

Source Link

Document

Sets the line number to the specified argument.

Usage

From source file:Main.java

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

    FileInputStream fis = new FileInputStream("C:/test.txt");
    LineNumberInputStream lnis = new LineNumberInputStream(fis);

    lnis.setLineNumber(100);

    int i = lnis.getLineNumber();

    System.out.print("Line number: " + i);

}