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

public Class ConcatFileInputStream

extends InputStream
Class Inheritance
Imports
java.io.BufferedInputStream, .File, .IOException, .InputStream, java.nio.file.Files, org.apache.tools.ant.Project, .ProjectComponent, .Task

Special InputStream that will concatenate the contents of an array of files.

Field Summary

Modifier and TypeField and Description
private int
private InputStream
private static final int
private boolean
private File[]
private ProjectComponent

Constructor Summary

AccessConstructor and Description
public
ConcatFileInputStream(File[]
File[].
file
)

Construct a new ConcatFileInputStream with the specified File[].

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 void
log(String
the String message.
message
,
int
the int logging level.
loglevel
)

Log a message with the specified logging level.

private void
openFile(int index)

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
setManagingComponent(ProjectComponent
the managing Task.
pc
)

Set a managing Task for this ConcatFileInputStream.

public void
setManagingTask(Task
the managing Task.
task
)

Set a managing Task for this ConcatFileInputStream.

Inherited from java.io.InputStream:
availablemarkmarkSupportednullInputStreamreadreadreadAllBytesreadNBytesreadNBytesresetskipskipNBytestransferTo

Field Detail

currentIndexback to summary
private int currentIndex
currentStreamback to summary
private InputStream currentStream
EOFback to summary
private static final int EOF
eofback to summary
private boolean eof
fileback to summary
private File[] file
managingPcback to summary
private ProjectComponent managingPc

Constructor Detail

ConcatFileInputStreamback to summary
public ConcatFileInputStream(File[] file) throws IOException

Construct a new ConcatFileInputStream with the specified File[].

Parameters
file:File[]

File[].

Exceptions
IOException:
if I/O errors occur.

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()
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.

openFileback to summary
private void openFile(int index) 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
setManagingComponentback to summary
public void setManagingComponent(ProjectComponent pc)

Set a managing Task for this ConcatFileInputStream.

Parameters
pc:ProjectComponent

the managing Task.

setManagingTaskback to summary
public void setManagingTask(Task task)

Set a managing Task for this ConcatFileInputStream.

Parameters
task:Task

the managing Task.