org.apache.tools.ant.utilClass ConcatResourceInputStream
- java.lang.Object
- java.io.InputStream
- org.apache.tools.ant.util.ConcatResourceInputStream
- All Implemented Interfaces:
- java.io.Closeable, java.lang.AutoCloseable
public class ConcatResourceInputStream extends java.io.InputStream
SpecialInputStream
that will concatenate the contents of Resources from a single ResourceCollection.
- Since:
- Ant 1.7
Constructor Summary
Constructors Constructor and Description ConcatResourceInputStream(ResourceCollection rc)
Construct a new ConcatResourceInputStream for the specified ResourceCollection.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
close()
Close the stream.boolean
isIgnoreErrors()
Find out whether this ConcatResourceInputStream ignores errors.void
log(java.lang.String message, int loglevel)
Log a message with the specified logging level.int
read()
Read a byte.void
setIgnoreErrors(boolean b)
Set whether this ConcatResourceInputStream ignores errors.void
setManagingComponent(ProjectComponent pc)
Set a managingProjectComponent
for thisConcatResourceInputStream
.
Constructor Detail
ConcatResourceInputStream
public ConcatResourceInputStream(ResourceCollection rc)Construct a new ConcatResourceInputStream for the specified ResourceCollection.
- Parameters:
rc
- the ResourceCollection to combine.
Method Detail
setIgnoreErrors
public void setIgnoreErrors(boolean b)Set whether this ConcatResourceInputStream ignores errors.
- Parameters:
b
- whether to ignore errors.
isIgnoreErrors
public boolean isIgnoreErrors()Find out whether this ConcatResourceInputStream ignores errors.
- Returns:
- boolean ignore-errors flag.
close
public void close() throws java.io.IOExceptionClose the stream.
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Overrides:
close
in classjava.io.InputStream
- Throws:
java.io.IOException
- if there is an error.
read
public int read() throws java.io.IOExceptionRead a byte.
- Specified by:
read
in classjava.io.InputStream
- Returns:
- the byte (0 - 255) or -1 if this is the end of the stream.
- Throws:
java.io.IOException
- if there is an error.
setManagingComponent
public void setManagingComponent(ProjectComponent pc)Set a managingProjectComponent
for thisConcatResourceInputStream
.
- Parameters:
pc
- the managingProjectComponent
.
log
public void log(java.lang.String message, int loglevel)Log a message with the specified logging level.
- Parameters:
message
- theString
message.loglevel
- theint
logging level.