org.teatrove.tea.io
Class LinePositionReader

java.lang.Object
  extended by java.io.Reader
      extended by java.io.FilterReader
          extended by org.teatrove.trove.io.PositionReader
              extended by org.teatrove.tea.io.PositionReader
                  extended by org.teatrove.tea.io.LinePositionReader
All Implemented Interfaces:
Closeable, Readable

Deprecated. Moved to org.teatrove.trove.io package.

public class LinePositionReader
extends PositionReader

LinePositionReader aids in printing line numbers for error reporting.

Author:
Brian S O'Neill

Field Summary
 
Fields inherited from class org.teatrove.trove.io.PositionReader
mPosition, mPosReader
 
Fields inherited from class java.io.FilterReader
in
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
LinePositionReader(Reader reader)
          Deprecated.  
 
Method Summary
static String cleanWhitespace(String str)
          Deprecated. Converts all whitespace characters in a String to space characters ( ).
static 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.  
 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 org.teatrove.trove.io.PositionReader
close, getNextPosition, read
 
Methods inherited from class java.io.FilterReader
mark, markSupported, ready, reset, skip
 
Methods inherited from class java.io.Reader
read, read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinePositionReader

public LinePositionReader(Reader reader)
Deprecated. 
Method Detail

read

public int read()
         throws IOException
Deprecated. 
Overrides:
read in class PositionReader
Throws:
IOException

readLine

public String readLine()
                throws IOException
Deprecated. 
After calling readLine, calling getLineNumber returns the next line number.

Throws:
IOException

skipForwardToLine

public int skipForwardToLine(int line)
                      throws 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
Throws:
IOException

getLineNumber

public int getLineNumber()
Deprecated. 
Returns:
the number of the line currently being read or the next one available.

cleanWhitespace

public static String cleanWhitespace(String str)
Deprecated. 
Converts all whitespace characters in a String to space characters ( ).


createSequence

public static String createSequence(char c,
                                    int length)
Deprecated. 
Creates and returns a String containing a sequence of the specified length, repeating the given character.



Copyright © 1997-2012 TeaTrove.org. All Rights Reserved.