com.go.tea.io
Class LinePositionReader
java.lang.Object
|
+--java.io.Reader
|
+--java.io.FilterReader
|
+--com.go.trove.io.PositionReader
|
+--com.go.tea.io.PositionReader
|
+--com.go.tea.io.LinePositionReader
Deprecated. Moved to com.go.trove.io package.
- public class LinePositionReader
- extends PositionReader
LinePositionReader aids in printing line numbers for error reporting.
- Version:
- 16 , 12/11/00
- Author:
- Brian S O'Neill
| Fields inherited from class java.io.FilterReader |
in |
| Fields inherited from class java.io.Reader |
lock |
|
Method Summary |
static java.lang.String |
cleanWhitespace(java.lang.String str)
Deprecated. Converts all whitespace characters in a String to space characters
( ). |
static java.lang.String |
createSequence(char c,
int length)
Deprecated. Creates and returns a String containing a sequence of the specified
length, repeating the given character. |
int |
getLineNumber()
Deprecated. |
int |
read()
Deprecated. |
java.lang.String |
readLine()
Deprecated. After calling readLine, calling getLineNumber returns the next line
number. |
int |
skipForwardToLine(int line)
Deprecated. Skips forward into the stream to the line number specified. |
| Methods inherited from class java.io.FilterReader |
mark, markSupported, ready, reset, skip |
| Methods inherited from class java.io.Reader |
read |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinePositionReader
public LinePositionReader(java.io.Reader reader)
- Deprecated.
read
public int read()
throws java.io.IOException
- Deprecated.
- Overrides:
read in class PositionReader
readLine
public java.lang.String readLine()
throws java.io.IOException
- Deprecated.
- After calling readLine, calling getLineNumber returns the next line
number.
skipForwardToLine
public int skipForwardToLine(int line)
throws java.io.IOException
- Deprecated.
- Skips forward into the stream to the line number specified. The line
can then be read by calling readLine. Calling getPosition
returns the position that the line begins.
- Returns:
- the line number reached
getLineNumber
public int getLineNumber()
- Deprecated.
- Returns:
- the number of the line currently being read or the next one
available.
cleanWhitespace
public static java.lang.String cleanWhitespace(java.lang.String str)
- Deprecated.
- Converts all whitespace characters in a String to space characters
( ).
createSequence
public static java.lang.String createSequence(char c,
int length)
- Deprecated.
- Creates and returns a String containing a sequence of the specified
length, repeating the given character.