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

public Class StringReaderSource

extends AbstractReaderSource
Class Inheritance
Imports
org.codehaus.groovy.control.CompilerConfiguration, java.io.IOException, .Reader, .StringReader, java.net.URI, .URISyntaxException

A ReaderSource for source strings.

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
StringReaderSource(String
string containing script source
string
,
CompilerConfiguration
configuration for compiling source
configuration
)

Creates the ReaderSource from a File descriptor.

Method Summary

Modifier and TypeMethod and Description
public Reader
getReader()

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

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

Returns:

Data URI containing the literal value of this source string.
getURI
()

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

Returns a Data URI (RFC 2397) containing the literal value of this source string.
Inherited from org.codehaus.groovy.control.io.AbstractReaderSource:
canReopenSourcecleanupgetLine

Field Detail

stringback to summary
private final String string

Constructor Detail

StringReaderSourceback to summary
public StringReaderSource(String string, CompilerConfiguration configuration)

Creates the ReaderSource from a File descriptor.

Parameters
string:String

string containing script source

configuration:CompilerConfiguration

configuration for compiling source

Method Detail

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 Data URI (RFC 2397) containing the literal value of this source string.

Returns:URI

Data URI containing the literal value of this source string.