Top Description Fields Constructors Methods
org.codehaus.groovy.control.io

public Class FileReaderSource

extends AbstractReaderSource
Class Inheritance
Imports
org.codehaus.groovy.control.CompilerConfiguration, java.io.BufferedInputStream, .File, .FileInputStream, .IOException, .InputStream, .InputStreamReader, .Reader, java.net.URI, java.nio.charset.Charset, .StandardCharsets

A ReaderSource for source files.

Field Summary

Modifier and TypeField and Description
private final File
private final Charset
Inherited from org.codehaus.groovy.control.io.AbstractReaderSource:
configuration

Constructor Summary

AccessConstructor and Description
public
FileReaderSource(File
script source file
file
,
CompilerConfiguration
configuration for compiling source
configuration
)

Creates the ReaderSource from a File descriptor.

Method Summary

Modifier and TypeMethod and Description
public File
public Reader
getReader()

Implements org.codehaus.groovy.control.io.ReaderSource.getReader.

Returns a new Reader on the underlying source object.
public URI

Returns:

URI for the file of this source.
getURI
()

Implements org.codehaus.groovy.control.io.ReaderSource.getURI.

Returns a URI for the file of this source.
Inherited from org.codehaus.groovy.control.io.AbstractReaderSource:
canReopenSourcecleanupgetLine

Field Detail

fileback to summary
private final File file
UTF8back to summary
private final Charset UTF8

Constructor Detail

FileReaderSourceback to summary
public FileReaderSource(File file, CompilerConfiguration configuration)

Creates the ReaderSource from a File descriptor.

Parameters
file:File

script source file

configuration:CompilerConfiguration

configuration for compiling source

Method Detail

getFileback to summary
public File getFile()
getReaderback to summary
public Reader getReader() throws IOException

Implements org.codehaus.groovy.control.io.ReaderSource.getReader.

Returns a new Reader on the underlying source object.

Returns:Reader

Doc from org.codehaus.groovy.control.io.ReaderSource.getReader.

the reader to the resource

Exceptions
IOException:

Doc from org.codehaus.groovy.control.io.ReaderSource.getReader.

if there was an error opening for stream

getURIback to summary
public URI getURI()

Implements org.codehaus.groovy.control.io.ReaderSource.getURI.

Returns a URI for the file of this source.

Returns:URI

URI for the file of this source.