org.apache.maven.doxia.util
Class ByLineReaderSource

java.lang.Object
  extended by org.apache.maven.doxia.util.ByLineReaderSource
All Implemented Interfaces:
ByLineSource

public class ByLineReaderSource
extends java.lang.Object
implements ByLineSource

ByLineSource default implementation

Version:
$Id: ByLineReaderSource.java 746978 2009-02-23 12:20:33Z vsiveton $

Constructor Summary
ByLineReaderSource(java.io.Reader in)
          Creates the ByLineReaderSource.
 
Method Summary
 void close()
          close the source ...
 int getLineNumber()
          

getLineNumber

 java.lang.String getName()
          

getName

 java.lang.String getNextLine()
          

getNextLine

 void unget(java.lang.String s)
          

unget

 void ungetLine()
          

ungetLine

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByLineReaderSource

public ByLineReaderSource(java.io.Reader in)
Creates the ByLineReaderSource.

Parameters:
in - real source :)
Method Detail

getNextLine

public final java.lang.String getNextLine()
                                   throws ParseException

getNextLine

Specified by:
getNextLine in interface ByLineSource
Returns:
the next line. null if we reached the end.
Throws:
ParseException - on I/O error

getName

public final java.lang.String getName()

getName

Specified by:
getName in interface ByLineSource
Returns:
the name of the input. could be the filename for example

getLineNumber

public final int getLineNumber()

getLineNumber

Specified by:
getLineNumber in interface ByLineSource
Returns:
the current line number

close

public final void close()
close the source ...

Specified by:
close in interface ByLineSource

ungetLine

public final void ungetLine()
                     throws java.lang.IllegalStateException

ungetLine

Specified by:
ungetLine in interface ByLineSource
Throws:
java.lang.IllegalStateException - if the ungetLine/unget is called more than one time without calling getNextLine()

unget

public final void unget(java.lang.String s)
                 throws java.lang.IllegalStateException

unget

Specified by:
unget in interface ByLineSource
Parameters:
s - some text to push back to the parser
Throws:
java.lang.IllegalStateException - if the ungetLine/unget is called more than one time without calling getNextLine()


Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.