All Implemented Interfaces:
Closeable, AutoCloseable, Readable

  • Field Summary

  • Constructor Summary

    Constructors

    Create a new line-numbering reader, using the default input-buffer size.

    Create a new line-numbering reader, reading characters into a buffer of the given size.

  • Method Summary

    int

    Get the current line number.

    void

    mark(int readAheadLimit)

    Mark the present position in the stream.

    int

    read()

    int

    read(char[] cbuf, int off, int len)

    Reads characters into a portion of an array.

    readLine()

    void

    reset()

    Reset the stream to the most recent mark.

    void

    setLineNumber(int lineNumber)

    Set the current line number.

  • Constructor Details

    • LineNumberReader

    • LineNumberReader

  • Method Details

    • setLineNumber

    • getLineNumber

    • read

    • read

    • readLine

    • mark

    • reset