public interface ReaderSource extends HasCleanup
An interface for things that can supply (and potentially resupply) a Reader on a source stream.
Type Params | Return Type | Name and description |
---|---|---|
|
public boolean |
canReopenSource() Returns true if the source can be restarted (ie. if getReader() will return non-null on subsequent calls). |
|
public void |
cleanup() Cleans up any cached resources used by getLine(). |
|
public String |
getLine(int lineNumber, Janitor janitor) Returns a line from the source, or null, if unavailable. |
|
public Reader |
getReader() Returns a new Reader on the underlying source object. |
|
public URI |
getURI() Returns a URI for this source. |
Methods inherited from class | Name |
---|---|
interface HasCleanup |
cleanup |
Returns true if the source can be restarted (ie. if getReader() will return non-null on subsequent calls).
Cleans up any cached resources used by getLine().
Returns a line from the source, or null, if unavailable. If you supply a Janitor, resources will be cached.
lineNumber
- the number of the line of interestjanitor
- helper to clean up afterwardsReturns a new Reader on the underlying source object. Returns null if the source can't be reopened.
Returns a URI for this source.