org.apache.tools.antClass DemuxInputStream
- java.lang.Object
- java.io.InputStream
- org.apache.tools.ant.DemuxInputStream
- All Implemented Interfaces:
- java.io.Closeable, java.lang.AutoCloseable
public class DemuxInputStream extends java.io.InputStream
Passes input requests to the project object for demuxing into individual tasks and threads.
- Since:
- Ant 1.6
Constructor Summary
Constructors Constructor and Description DemuxInputStream(Project project)
Create a DemuxInputStream for the given project
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
read()
Read a byte from the project's demuxed input.int
read(byte[] buffer, int offset, int length)
Read bytes from the project's demuxed input.
Constructor Detail
DemuxInputStream
public DemuxInputStream(Project project)Create a DemuxInputStream for the given project
- Parameters:
project
- the project instance
Method Detail
read
public int read() throws java.io.IOExceptionRead a byte from the project's demuxed input.
- Specified by:
read
in classjava.io.InputStream
- Returns:
- the next byte
- Throws:
java.io.IOException
- on error
read
public int read(byte[] buffer, int offset, int length) throws java.io.IOExceptionRead bytes from the project's demuxed input.
- Overrides:
read
in classjava.io.InputStream
- Parameters:
buffer
- an array of bytes to read intooffset
- the offset in the array of byteslength
- the number of bytes in the array- Returns:
- the number of bytes read
- Throws:
java.io.IOException
- on error