Package net.jangaroo.jooc.util
Class LineRangeReader
- java.lang.Object
-
- java.io.Reader
-
- net.jangaroo.jooc.util.LineRangeReader
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
public class LineRangeReader extends Reader
A LineRangeReader that reads a line subrange of a given Reader. Line numbers start at 1. The given endLine is the first line that is not included (like inString.substring(int, int)).
-
-
Constructor Summary
Constructors Constructor Description LineRangeReader(Reader delegate, int startLine, int endLine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()intread(char[] cbuf, int off, int len)-
Methods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, read, ready, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
LineRangeReader
public LineRangeReader(Reader delegate, int startLine, int endLine) throws IOException
- Throws:
IOException
-
-
Method Detail
-
read
public int read(char[] cbuf, int off, int len) throws IOException- Specified by:
readin classReader- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException
-
-