Top Description Fields Constructors Methods
org.apache.tools.ant.util

public Class ConcatResourceInputStream

extends InputStream
Class Inheritance
Imports
java.io.BufferedInputStream, .IOException, .InputStream, java.util.Iterator, org.apache.tools.ant.Project, .ProjectComponent, org.apache.tools.ant.types.Resource, .ResourceCollection

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

Field Summary

Modifier and TypeField and Description
private InputStream
private static final int
private boolean
private boolean
private Iterator<Resource>
private ProjectComponent

Constructor Summary

AccessConstructor and Description
public
ConcatResourceInputStream(ResourceCollection
the ResourceCollection to combine.
rc
)

Construct a new ConcatResourceInputStream for the specified ResourceCollection.

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides java.io.InputStream.close.

Implements java.io.Closeable.close.

Close the stream.
private void
public boolean

Returns:

boolean ignore-errors flag.
isIgnoreErrors
()

Find out whether this ConcatResourceInputStream ignores errors.

public void
log(String
the String message.
message
,
int
the int logging level.
loglevel
)

Log a message with the specified logging level.

private void
public int

Returns:

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

Implements abstract java.io.InputStream.read.

Read a byte.
private int
public void
setIgnoreErrors(boolean
whether to ignore errors.
b
)

Set whether this ConcatResourceInputStream ignores errors.

public void
setManagingComponent(ProjectComponent
the managing ProjectComponent.
pc
)

Set a managing ProjectComponent for this ConcatResourceInputStream.

Inherited from java.io.InputStream:
availablemarkmarkSupportednullInputStreamreadreadreadAllBytesreadNBytesreadNBytesresetskipskipNBytestransferTo

Field Detail

currentStreamback to summary
private InputStream currentStream
EOFback to summary
private static final int EOF
eofback to summary
private boolean eof
ignoreErrorsback to summary
private boolean ignoreErrors
iterback to summary
private Iterator<Resource> iter
managingPcback to summary
private ProjectComponent managingPc

Constructor Detail

ConcatResourceInputStreamback to summary
public ConcatResourceInputStream(ResourceCollection rc)

Construct a new ConcatResourceInputStream for the specified ResourceCollection.

Parameters
rc:ResourceCollection

the ResourceCollection to combine.

Method Detail

closeback to summary
public void close() throws IOException

Overrides java.io.InputStream.close.

Implements java.io.Closeable.close.

Close the stream.

Annotations
@Override
Exceptions
IOException:
if there is an error.
closeCurrentback to summary
private void closeCurrent()
isIgnoreErrorsback to summary
public boolean isIgnoreErrors()

Find out whether this ConcatResourceInputStream ignores errors.

Returns:boolean

boolean ignore-errors flag.

logback to summary
public void log(String message, int loglevel)

Log a message with the specified logging level.

Parameters
message:String

the String message.

loglevel:int

the int logging level.

nextResourceback to summary
private void nextResource() throws IOException
readback to summary
public int read() throws IOException

Implements abstract java.io.InputStream.read.

Read a byte.

Returns:int

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

Annotations
@Override
Exceptions
IOException:
if there is an error.
readCurrentback to summary
private int readCurrent() throws IOException
setIgnoreErrorsback to summary
public void setIgnoreErrors(boolean b)

Set whether this ConcatResourceInputStream ignores errors.

Parameters
b:boolean

whether to ignore errors.

setManagingComponentback to summary
public void setManagingComponent(ProjectComponent pc)

Set a managing ProjectComponent for this ConcatResourceInputStream.

Parameters
pc:ProjectComponent

the managing ProjectComponent.