Package org.apache.tools.ant.util
Class ConcatFileInputStream
java.lang.Object
java.io.InputStream
org.apache.tools.ant.util.ConcatFileInputStream
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class ConcatFileInputStream
extends java.io.InputStream
Special
InputStream
that will
concatenate the contents of an array of files.-
Constructor Summary
Constructors Constructor Description ConcatFileInputStream(java.io.File[] file)
Construct a newConcatFileInputStream
with the specifiedFile[]
. -
Method Summary
Modifier and Type Method Description void
close()
Close the stream.void
log(java.lang.String message, int loglevel)
Log a message with the specified logging level.int
read()
Read a byte.void
setManagingComponent(ProjectComponent pc)
Set a managingTask
for thisConcatFileInputStream
.void
setManagingTask(Task task)
Set a managingTask
for thisConcatFileInputStream
.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
-
ConcatFileInputStream
public ConcatFileInputStream(java.io.File[] file) throws java.io.IOExceptionConstruct a newConcatFileInputStream
with the specifiedFile[]
.- Parameters:
file
-File[]
.- Throws:
java.io.IOException
- if I/O errors occur.
-
-
Method Details
-
close
public void close() throws java.io.IOExceptionClose the stream.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- 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.
-
setManagingTask
Set a managingTask
for thisConcatFileInputStream
.- Parameters:
task
- the managingTask
.
-
setManagingComponent
Set a managingTask
for thisConcatFileInputStream
.- Parameters:
pc
- the managingTask
.
-
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.
-