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

public Class InputStreamReaderSource

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

A ReaderSource for source strings.

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
InputStreamReaderSource(InputStream
stream containing source
stream
,
CompilerConfiguration
configuration for compiling source
configuration
)

Creates the ReaderSource from a File descriptor.

Method Summary

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

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

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

Returns:

null
getURI
()

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

TODO: Should return the URI for this source, but we can't know what it is here.
Inherited from org.codehaus.groovy.control.io.AbstractReaderSource:
cleanupgetLine

Field Detail

streamback to summary
private InputStream stream

Constructor Detail

InputStreamReaderSourceback to summary
public InputStreamReaderSource(InputStream stream, CompilerConfiguration configuration)

Creates the ReaderSource from a File descriptor.

Parameters
stream:InputStream

stream containing source

configuration:CompilerConfiguration

configuration for compiling source

Method Detail

canReopenSourceback to summary
public boolean canReopenSource()

Overrides org.codehaus.groovy.control.io.AbstractReaderSource.canReopenSource.

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

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

Returns:boolean

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

true if the resource can be reopened for reading

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.

TODO: Should return the URI for this source, but we can't know what it is here.

Returns:URI

null