HasCleanup
AbstractReaderSource
, FileReaderSource
, InputStreamReaderSource
, StringReaderSource
, URLReaderSource
public interface ReaderSource extends HasCleanup
Modifier and Type | Method | Description |
---|---|---|
boolean |
canReopenSource() |
Returns true if the source can be restarted (ie.
|
void |
cleanup() |
Cleans up any cached resources used by getLine().
|
String |
getLine(int lineNumber,
Janitor janitor) |
Returns a line from the source, or null, if unavailable.
|
Reader |
getReader() |
Returns a new Reader on the underlying source object.
|
URI |
getURI() |
Returns a URI for this source.
|
Reader getReader() throws IOException
IOException
- if there was an error opening for streamboolean canReopenSource()
String getLine(int lineNumber, Janitor janitor)
lineNumber
- the number of the line of interestjanitor
- helper to clean up afterwardsvoid cleanup()
cleanup
in interface HasCleanup
URI getURI()