InputStream which sits on top of another stream, tracking the current line and column as it
reads from the underlying stream. Closing the
LineNumberInputStream does not close the
underlying stream, but if the
LineNumberInputStream holds the only remaining reference to the
underlying stream, then discarding the
LineNumberInputStream will cause the underlying stream
to likewise be discarded and thus closed.
You should not read directly from the underlying stream after creating a
top of it, as doing so will naturally throw off the
- Source Code:
- View Source
- The current line number (starting at 1).
- The current column number (starting at 1).
- The width of a tab character.
Instance Method Summary
init ( source:
Creates a new
source the underlying stream
The current line number (starting at 1).
The current column number (starting at 1).
The width of a tab character.