com.android.ide.common.blame.parser.util
Class OutputLineReader

java.lang.Object
  extended by com.android.ide.common.blame.parser.util.OutputLineReader

public class OutputLineReader
extends java.lang.Object

Reads a compiler's output line-by-line.


Constructor Summary
OutputLineReader(java.lang.String text)
          Creates a new OutputLineReader.
 
Method Summary
 int getLineCount()
           
 boolean hasNextLine()
           
 java.lang.String peek(int lineToSkipCount)
          Reads the text of one the line at the given position, without moving the line pointer.
 void pushBack()
           
 java.lang.String readLine()
          Reads the next line of text, moving the line pointer to the next one.
 void skipNextLine()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputLineReader

public OutputLineReader(@NonNull
                        java.lang.String text)
Creates a new OutputLineReader.

Parameters:
text - the text to read.
Method Detail

getLineCount

public int getLineCount()

readLine

@Nullable
public java.lang.String readLine()
Reads the next line of text, moving the line pointer to the next one.

Returns:
the contents of the next line, or null if we reached the end of the text.

peek

@Nullable
public java.lang.String peek(int lineToSkipCount)
Reads the text of one the line at the given position, without moving the line pointer.

Parameters:
lineToSkipCount - the number of lines to skip from the line pointer.
Returns:
the contents of the specified line, or null if the specified position is greater than the end of the text.

hasNextLine

public boolean hasNextLine()

skipNextLine

public void skipNextLine()

pushBack

public void pushBack()