org.apache.tools.ant.util

Class ConcatResourceInputStream

public class ConcatResourceInputStream extends InputStream

Special InputStream that will concatenate the contents of Resources from a single ResourceCollection.

Since: Ant 1.7

Constructor Summary
ConcatResourceInputStream(ResourceCollection rc)
Construct a new ConcatResourceInputStream for the specified ResourceCollection.
Method Summary
voidclose()
Close the stream.
booleanisIgnoreErrors()
Find out whether this ConcatResourceInputStream ignores errors.
voidlog(String message, int loglevel)
Log a message with the specified logging level.
intread()
Read a byte.
voidsetIgnoreErrors(boolean b)
Set whether this ConcatResourceInputStream ignores errors.
voidsetManagingComponent(ProjectComponent pc)
Set a managing ProjectComponent for this ConcatResourceInputStream.

Constructor Detail

ConcatResourceInputStream

public ConcatResourceInputStream(ResourceCollection rc)
Construct a new ConcatResourceInputStream for the specified ResourceCollection.

Parameters: rc the ResourceCollection to combine.

Method Detail

close

public void close()
Close the stream.

Throws: IOException if there is an error.

isIgnoreErrors

public boolean isIgnoreErrors()
Find out whether this ConcatResourceInputStream ignores errors.

Returns: boolean ignore-errors flag.

log

public void log(String message, int loglevel)
Log a message with the specified logging level.

Parameters: message the String message. loglevel the int logging level.

read

public int read()
Read a byte.

Returns: the byte (0 - 255) or -1 if this is the end of the stream.

Throws: IOException if there is an error.

setIgnoreErrors

public void setIgnoreErrors(boolean b)
Set whether this ConcatResourceInputStream ignores errors.

Parameters: b whether to ignore errors.

setManagingComponent

public void setManagingComponent(ProjectComponent pc)
Set a managing ProjectComponent for this ConcatResourceInputStream.

Parameters: pc the managing ProjectComponent.