## org.codehaus.groovy.control.io
Class AbstractReaderSource

For ReaderSources that can choose a parent class, a base that provides common functionality.

author:
  Chris Poirier

version:
  $Id: AbstractReaderSource.java 8004 2007-09-08 05:22:11Z paulk $

Field Summary
`CompilerConfiguration` | `configuration`
`String` | `line`
`BufferedReader` | `lineSource`
`int` | `number`

Constructor Summary
`AbstractReaderSource(CompilerConfiguration configuration)`

Method Summary
`boolean` | `canReopenSource()` Returns true if the source can be restarted (ie. if getReader() will return non-null on subsequent calls.
`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.

Constructor Detail

### AbstractReaderSource

    public AbstractReaderSource(CompilerConfiguration configuration)

Method Detail

### canReopenSource

    public boolean canReopenSource()

  Returns true if the source can be restarted (ie. if getReader() will return non-null on subsequent calls.

### cleanup

    public void cleanup()

  Cleans up any cached resources used by getLine().

### getLine

    public String getLine(int lineNumber, Janitor janitor)

  Returns a line from the source, or null, if unavailable. If you supply a Janitor, resources will be cached.