Package org.apache.maven.doxia.util
Class ByLineReaderSource
- java.lang.Object
-
- org.apache.maven.doxia.util.ByLineReaderSource
-
- All Implemented Interfaces:
ByLineSource
public class ByLineReaderSource extends Object implements ByLineSource
ByLineSourcedefault implementation
-
-
Constructor Summary
Constructors Constructor Description ByLineReaderSource(Reader in)Creates the ByLineReaderSource.ByLineReaderSource(Reader in, String name)Constructor for ByLineReaderSource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()close the source.intgetLineNumber()getLineNumber.StringgetName()getName.StringgetNextLine()getNextLine.voidunget(String s)unget.voidungetLine()ungetLine.
-
-
-
Constructor Detail
-
ByLineReaderSource
public ByLineReaderSource(Reader in)
Creates the ByLineReaderSource.- Parameters:
in- real source :)
-
-
Method Detail
-
getNextLine
public final String getNextLine() throws ParseException
getNextLine.
- Specified by:
getNextLinein interfaceByLineSource- Returns:
- a
Stringobject. - Throws:
ParseException- if any.
-
getName
public final String getName()
getName.
- Specified by:
getNamein interfaceByLineSource- Returns:
- a
Stringobject.
-
getLineNumber
public final int getLineNumber()
getLineNumber.
- Specified by:
getLineNumberin interfaceByLineSource- Returns:
- a int.
-
close
public final void close()
close the source.- Specified by:
closein interfaceByLineSource
-
ungetLine
public final void ungetLine()
ungetLine.
This should throw a java.lang.IllegalStateException if called more than one time without calling getNextLine().- Specified by:
ungetLinein interfaceByLineSource
-
unget
public final void unget(String s)
unget.
- Specified by:
ungetin interfaceByLineSource- Parameters:
s- some text to push back to the parser. This should throw a java.lang.IllegalStateException if called more than one time without calling getNextLine().
-
-