Package org.apache.tools.ant.util

# Class ConcatResourceInputStream

java.lang.Object
java.io.InputStream
org.apache.tools.ant.util.ConcatResourceInputStream

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

public class ConcatResourceInputStream extends InputStream
Special `InputStream` that will concatenate the contents of Resources from a single ResourceCollection.

Since:
  Ant 1.7

## Constructor Summary

Constructors
Constructor
Description
`ConcatResourceInputStream(ResourceCollection rc)`
Construct a new ConcatResourceInputStream for the specified ResourceCollection.

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
Close the stream.
`boolean`
`isIgnoreErrors()`
Find out whether this ConcatResourceInputStream ignores errors.
`void`
`log(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 managing `ProjectComponent` for this `ConcatResourceInputStream`.

### Methods inherited from class java.io.InputStream

`available, mark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ConcatResourceInputStream

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

Parameters:
  `rc` - the ResourceCollection to combine.

## Method Details

### 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 IOException
Close the stream.

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Overrides:
  `close` in class `InputStream`
Throws:
  `IOException` - if there is an error.

### read

public int read() throws IOException
Read a byte.

Specified by:
  `read` in class `InputStream`
Returns:
  the byte (0 - 255) or -1 if this is the end of the stream.
Throws:
  `IOException` - if there is an error.

### setManagingComponent

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

Parameters:
  `pc` - the managing `ProjectComponent`.

### 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.